]> git.eshelyaron.com Git - emacs.git/log
emacs.git
7 years agotest-calc-23889: Skip test on 32-bit platforms
Tino Calancha [Fri, 26 May 2017 01:59:19 +0000 (10:59 +0900)]
test-calc-23889: Skip test on 32-bit platforms

This test fails on some 32-bit platforms as mentioned in
https://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00737.html
* test/lisp/calc/calc-tests.el (test-calc-23889): Skip when
the Lisp integer is not big enough.

7 years agoFix NS tooltips showing in the wrong place (bug#27053)
Alan Third [Thu, 25 May 2017 19:13:21 +0000 (20:13 +0100)]
Fix NS tooltips showing in the wrong place (bug#27053)

* src/nsfns.m (compute_tip_xy): Get current mouse position instead of
last recorded position.

7 years agolisp/net/soap-client.el: Bump version to 3.1.2
Thomas Fitzsimmons [Wed, 24 May 2017 18:34:13 +0000 (14:34 -0400)]
lisp/net/soap-client.el: Bump version to 3.1.2

* lisp/net/soap-client.el: Bump version to 3.1.2.

7 years agoFix soap-inspect.el doc strings
Thomas Fitzsimmons [Wed, 24 May 2017 19:01:01 +0000 (15:01 -0400)]
Fix soap-inspect.el doc strings

* lisp/net/soap-inspect.el (soap-inspect-xs-attribute): Fix doc
string.
(soap-inspect-xs-attribute-group): Likewise.

7 years agoFix two soap-client.el byte compilation warnings
Thomas Fitzsimmons [Wed, 24 May 2017 18:58:47 +0000 (14:58 -0400)]
Fix two soap-client.el byte compilation warnings

* lisp/net/soap-client.el (url-http-response-status): Add defvar.
(soap-fetch-xml-from-url): Remove special declaration of
url-http-response-status.
(soap-invoke-internal): Likewise.

7 years agolisp/net/soap-client.el: Require cl-lib version 0.6.1
Thomas Fitzsimmons [Wed, 24 May 2017 18:32:00 +0000 (14:32 -0400)]
lisp/net/soap-client.el: Require cl-lib version 0.6.1

* lisp/net/soap-client.el: Require cl-lib version 0.6.1.

7 years agolisp/net/soap-client.el: Shorten some long lines
Thomas Fitzsimmons [Wed, 24 May 2017 18:28:32 +0000 (14:28 -0400)]
lisp/net/soap-client.el: Shorten some long lines

* lisp/net/soap-client.el (soap-encode-xs-element): Remove
unnecessary progn.
(soap-xs-add-union): Wrap long line.

Co-authored-by: Stefan Monnier <monnier@iro.umontreal.ca>
7 years agoRemove cl dependency in soap-client.el and soap-inspect.el
Alex Harsanyi [Wed, 24 May 2017 18:18:39 +0000 (14:18 -0400)]
Remove cl dependency in soap-client.el and soap-inspect.el

* lisp/net/soap-inspect.el: Replace cl library with cl-lib, case
with cl-case, destructuring-bind with cl-destructuring-bind and
loop with cl-loop.

* lisp/net/soap-client.el: Replace cl library with cl-lib,
defstruct with cl-defstruct, assert with cl-assert, case with
cl-case, ecase with cl-ecase, loop with cl-loop and
destructuring-bind with cl-destructuring-bind.

Co-authored-by: Stefan Monnier <monnier@iro.umontreal.ca>
7 years agoSwitch Tramp to cl-lib
Michael Albinus [Thu, 25 May 2017 08:04:12 +0000 (10:04 +0200)]
Switch Tramp to cl-lib

* lisp/net/tramp-compat.el (cl-lib): Require it rather than cl.

* lisp/net/tramp-ftp.el: Don't require cl.

* lisp/net/tramp-gvfs.el: Don't require cl.
(tramp-gvfs-handler-mounted-unmounted)
(tramp-gvfs-connection-mounted-p): Use `cl-*' macros.

* lisp/net/tramp-sh.el: Don't require cl.
(tramp-set-file-uid-gid): Use `shell-quote-argument'.
(tramp-sh-gvfs-monitor-dir-process-filter)
(tramp-sh-inotifywait-process-filter): Use `cl-*' macros.

* lisp/net/tramp-smb.el: Don't require cl.
(tramp-smb-read-file-entry): Use `cl-*' macros.

* lisp/net/tramp.el (cl-lib): Require it rather than cl.
(tramp-parse-file, tramp-parse-shostkeys-sknownhosts)
(tramp-parse-passwd, tramp-parse-etc-group)
(tramp-parse-putty): Use `cl-*' macros.

7 years ago* CONTRIBUTE: Suggest autogen.sh's 'all' operand.
Paul Eggert [Thu, 25 May 2017 07:43:13 +0000 (00:43 -0700)]
* CONTRIBUTE: Suggest autogen.sh's 'all' operand.

7 years agoPort ATTRIBUTE_MAY_ALIAS to recent icc
Paul Eggert [Thu, 25 May 2017 07:24:51 +0000 (00:24 -0700)]
Port ATTRIBUTE_MAY_ALIAS to recent icc

* src/conf_post.h (ATTRIBUTE_MAY_ALIAS) [__ICC]:
Define to empty.  Otherwise, icc (ICC) 17.0.4 20170411 says
“warning #2621: attribute "__may_alias__" does not apply here”
for constructs like ‘struct sockaddr *sa = (whatever);
struct sockaddr_in __attribute__ ((__may_alias__)) *sin
= (struct sockaddr_in *) sa;’.

7 years agoMerge from gnulib
Paul Eggert [Thu, 25 May 2017 07:13:14 +0000 (00:13 -0700)]
Merge from gnulib

This incorporates:
2017-05-25 port to recent icc
* lib/intprops.h: Copy from gnulib.

7 years agoFix Tramp for python.el
Michael Albinus [Wed, 24 May 2017 20:26:20 +0000 (22:26 +0200)]
Fix Tramp for python.el

* lisp/net/tramp.el (tramp-get-connection-process): Check,
that VEC is a `tramp-file-name' structure.

7 years agoRaise version of macOS we define instancetype for (bug#27059)
Alan Third [Wed, 24 May 2017 19:18:52 +0000 (20:18 +0100)]
Raise version of macOS we define instancetype for (bug#27059)

* src/nsterm.m: Increase supported version number.

7 years agoDefine new types on macOS 10.6 (bug#27041)
Alan Third [Wed, 24 May 2017 18:40:19 +0000 (19:40 +0100)]
Define new types on macOS 10.6 (bug#27041)

* src/nsterm.h: Enable instancetype typedef for older macOS, and use
correct NSUInteger instead of int.

7 years agoDon't autoload new dns-mode command
Glenn Morris [Wed, 24 May 2017 17:11:32 +0000 (13:11 -0400)]
Don't autoload new dns-mode command

* lisp/textmodes/dns-mode.el (dns-mode-ipv6-to-nibbles):
Remove autoload cookie.

7 years ago* src/fns.c (sxhash): Fix records hashing (bug#27057, bug#26639)
Stefan Monnier [Wed, 24 May 2017 15:55:13 +0000 (11:55 -0400)]
* src/fns.c (sxhash): Fix records hashing (bug#27057, bug#26639)

(sxhash_vector): Make it work on pseudo vectors as well.
(sxhash): Treat records like vectors.

7 years agoAdapt tramp-tests.el according to new defstruct
Michael Albinus [Wed, 24 May 2017 14:17:59 +0000 (16:17 +0200)]
Adapt tramp-tests.el according to new defstruct

* test/lisp/net/tramp-tests.el (tramp-test03-file-name-defaults):
Fix test according to new defstruct.
(tramp-test29-environment-variables-and-port-numbers):
Expect it now as passed.  Cleanup at the end.

7 years agoIntroduce a defstruct `tramp-file-name' as central data structure.
Michael Albinus [Wed, 24 May 2017 14:16:53 +0000 (16:16 +0200)]
Introduce a defstruct `tramp-file-name' as central data structure.

This solves also Bug#27009.

* lisp/net/tramp.el (tramp-current-domain)
(tramp-current-port): New defvars.
(tramp-file-name): New defstruct.
(tramp-file-name-user-domain, tramp-file-name-host-port)
(tramp-file-name-equal-p): New defuns.
(tramp-file-name-p, tramp-file-name-method)
(tramp-file-name-user, tramp-file-name-host)
(tramp-file-name-localname, tramp-file-name-hop)
(tramp-file-name-real-user, tramp-file-name-domain)
(tramp-file-name-real-host, tramp-file-name-port):
Remove defuns.  They are provided by the defstruct, or not
needed anymore.
(tramp-dissect-file-name, tramp-buffer-name)
(tramp-make-tramp-file-name, tramp-get-buffer)
(tramp-set-connection-local-variables)
(tramp-debug-buffer-name, tramp-message)
(tramp-error-with-buffer, with-parsed-tramp-file-name)
(tramp-completion-dissect-file-name1)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-remote-p, tramp-handle-file-symlink-p)
(tramp-handle-find-backup-file-name)
(tramp-handle-insert-file-contents, tramp-process-actions)
(tramp-check-cached-permissions, tramp-local-host-p)
(tramp-get-remote-tmpdir, tramp-call-process)
(tramp-call-process-region, tramp-read-passwd)
(tramp-clear-passwd):
* lisp/net/tramp-adb.el (tramp-adb-parse-device-names)
(tramp-adb-handle-expand-file-name)
(tramp-adb-handle-file-truename, tramp-adb-handle-copy-file)
(tramp-adb-handle-process-file)
(tramp-adb-maybe-open-connection):
* lisp/net/tramp-cache.el (tramp-get-hash-table)
(tramp-get-file-property, tramp-set-file-property)
(tramp-flush-file-property, tramp-flush-directory-property)
(tramp-get-connection-property)
(tramp-set-connection-property, tramp-connection-property-p)
(tramp-flush-connection-property, tramp-cache-print)
(tramp-list-connections, tramp-dump-connection-properties)
(tramp-parse-connection-properties):
* lisp/net/tramp-cmds.el (tramp-cleanup-connection):
* lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name)
(tramp-gvfs-url-file-name, tramp-gvfs-handler-askpassword)
(tramp-gvfs-handler-mounted-unmounted)
(tramp-gvfs-mount-spec, tramp-gvfs-get-remote-uid)
(tramp-gvfs-get-remote-gid)
(tramp-gvfs-maybe-open-connection):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-truename)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-sh-handle-expand-file-name)
(tramp-sh-handle-start-file-process)
(tramp-sh-handle-process-file, tramp-compute-multi-hops)
(tramp-maybe-open-connection)
(tramp-make-copy-program-file-name, tramp-get-remote-path)
(tramp-get-inline-coding):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
(tramp-smb-handle-expand-file-name)
(tramp-smb-handle-file-acl, tramp-smb-handle-process-file)
(tramp-smb-handle-set-file-acl)
(tramp-smb-maybe-open-connection): Adapt according to defstruct.

7 years agoFix and improve UI of scroll bar menu (bug#27047)
Stephen Berman [Wed, 24 May 2017 11:33:27 +0000 (13:33 +0200)]
Fix and improve UI of scroll bar menu (bug#27047)

In addition, since the Emacs manual writes "scroll bar", "tool
bar" and "menu bar", use this convention in the Show/Hide menues
and tooltips as well.

* lisp/menu-bar.el (menu-bar-showhide-scroll-bar-menu): Make
pressing a radio button in the menu actually show that it was
pressed.  Replace the two radio buttons to turn the horizontal
scroll bar on and off with a single check-box toggle and add a
separator between this and the vertical scroll bar radio
buttons.  Use conventional spelling.
(menu-bar-horizontal-scroll-bar)
(menu-bar-no-horizontal-scroll-bar): Remove, since now unused.
(menu-bar-showhide-tool-bar-menu, menu-bar-showhide-menu)
(menu-bar-mode): Use conventional spelling.

7 years agoRemove string-as-unibyte
Katsumi Yamaoka [Wed, 24 May 2017 08:18:52 +0000 (08:18 +0000)]
Remove string-as-unibyte

* lisp/gnus/canlock.el (canlock-sha1): Remove useless variable.
(canlock-make-cancel-key): No need to use string-as-unibyte.

7 years agoFix concatenation of "^" with diff-file-junk-re
Tino Calancha [Wed, 24 May 2017 01:54:48 +0000 (10:54 +0900)]
Fix concatenation of "^" with diff-file-junk-re

This regexp contains "\\|", thus a concatenation
of "^" with it just matches the beginning of line for the
first alternative in diff-file-junk-re.
* lisp/vc/ediff-ptch.el (ediff-map-patch-buffer): Concat "^" with
diff-file-junk-re wrapped in a shy group.

7 years agoSuppress intermittent test failure on hydra
Glenn Morris [Wed, 24 May 2017 00:44:52 +0000 (20:44 -0400)]
Suppress intermittent test failure on hydra

* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
(eieio-test-37-obsolete-name-in-constructor): Skip on hydra.

7 years ago; Move recent test file to correct directory (my mistake)
Glenn Morris [Wed, 24 May 2017 00:42:28 +0000 (20:42 -0400)]
; Move recent test file to correct directory (my mistake)

7 years agoNew dns-mode command for IPv6 address conversion
Peder O. Klingenberg [Wed, 24 May 2017 00:34:08 +0000 (20:34 -0400)]
New dns-mode command for IPv6 address conversion

This converts IPv6 addresses to a format suitable for
reverse lookup zone files.  (Bug#26820)
* lisp/textmodes/dns-mode.el (dns-mode-map, dns-mode-menu):
Add dns-mode-ipv6-to-nibbles.
(dns-mode-ipv6-to-nibbles, dns-mode-reverse-and-expand-ipv6):
New functions.
* test/lisp/dns-mode-tests.el: New file.
; * etc/NEWS: Mention this.

7 years agoProtect *Backtrace* from being killed (Bug#26650)
Noam Postavsky [Tue, 25 Apr 2017 12:39:17 +0000 (08:39 -0400)]
Protect *Backtrace* from being killed (Bug#26650)

* lisp/emacs-lisp/debug.el (debugger-mode): Call `top-level' in
`kill-buffer-hook'.

7 years agoGive a name to lisp-mode's adaptive-fill-function (Bug#22730)
Noam Postavsky [Fri, 21 Apr 2017 04:00:26 +0000 (00:00 -0400)]
Give a name to lisp-mode's adaptive-fill-function (Bug#22730)

* lisp/emacs-lisp/lisp-mode.el (lisp-adaptive-fill): New function.
(lisp-mode-variables): Use it.

7 years agovc-hg.el: Silence byte compiler warning
Philipp Stephani [Tue, 23 May 2017 19:23:55 +0000 (21:23 +0200)]
vc-hg.el: Silence byte compiler warning

* lisp/vc/vc-hg.el (compilation-arguments): Forward-declare.

7 years agoDon't warn about missing brances on macOS
Paul Eggert [Tue, 23 May 2017 19:18:35 +0000 (21:18 +0200)]
Don't warn about missing brances on macOS

On macOS, removing -Wmissing-braces is not enough; the warning has to
be disabled explicitly.

7 years agoDon't treat ' as a string delimiter in RPM spec files
Wilfred Hughes [Tue, 23 May 2017 17:48:19 +0000 (18:48 +0100)]
Don't treat ' as a string delimiter in RPM spec files

' is commonly used as an apostrophe in the prose sections of spec
files, which was erroneously highlighted as strings. See for example
http://kmymoney2.sourceforge.net/phb/rpm-example.html

* lisp/progmodes/sh-script.el (sh-mode-syntax-table): Treat ' as
  punctuation in RPM spec files.

7 years ago* lisp/emacs-lisp/cl-indent.el: Don't require CL. Use lexical-binding.
Stefan Monnier [Tue, 23 May 2017 13:23:54 +0000 (09:23 -0400)]
* lisp/emacs-lisp/cl-indent.el: Don't require CL.  Use lexical-binding.

(common-lisp-indent-function-1): Remove unused var `last-point`.
(lisp-indent-error-function): Move defvar before first use.

7 years ago* lisp/international/rfc1843.el: Don't require CL. Use lexical-binding.
Stefan Monnier [Tue, 23 May 2017 13:18:26 +0000 (09:18 -0400)]
* lisp/international/rfc1843.el: Don't require CL.  Use lexical-binding.

7 years ago* lisp/international/utf7.el: Don't require CL. Use lexical-binding.
Stefan Monnier [Tue, 23 May 2017 13:12:06 +0000 (09:12 -0400)]
* lisp/international/utf7.el: Don't require CL.  Use lexical-binding.

7 years ago* lisp/net/shr.el: Use cl-lib instead of cl.
Stefan Monnier [Tue, 23 May 2017 13:09:28 +0000 (09:09 -0400)]
* lisp/net/shr.el: Use cl-lib instead of cl.

7 years ago* test/src/fns-tests.el, test/src/data-tests.el: Don't use `cl`
Stefan Monnier [Tue, 23 May 2017 12:39:20 +0000 (08:39 -0400)]
* test/src/fns-tests.el, test/src/data-tests.el: Don't use `cl`

* test/src/data-tests.el (binding-test-manual, binding-test-setq-default)
(binding-test-makunbound, data-tests-varalias-watchers)
(data-tests-local-variable-watchers): Silence compiler warnings.

7 years ago* lisp/vc/vc-hg.el (compilation-directory): Silence byte-compiler.
Stefan Monnier [Tue, 23 May 2017 12:16:59 +0000 (08:16 -0400)]
* lisp/vc/vc-hg.el (compilation-directory): Silence byte-compiler.

7 years agoFix GNUstep build
Alan Third [Tue, 23 May 2017 09:42:20 +0000 (02:42 -0700)]
Fix GNUstep build

* src/nsterm.h [NS_IMPL_GNUSTEP]: Add typedefs for Cocoa-only types.
(NSWindowStyleMaskUtilityWindow): #define to NSUtilityWindowMask in
GNUstep and old versions of macOS.
* src/nsfns.m (ns-set-mouse-absolute-pixel-position): Function only
works in cocoa, not GNUstep.

7 years agoAdd test for Bug#27009 in tramp-tests.el
Michael Albinus [Tue, 23 May 2017 07:25:03 +0000 (09:25 +0200)]
Add test for Bug#27009 in tramp-tests.el

* lisp/net/tramp-sh.el (tramp-compute-multi-hops):
Check `tramp-file-name-real-host' for being a local host.

* lisp/net/tramp.el (tramp-postfix-host-regexp): Fix docstring.

* test/lisp/net/tramp-tests.el (tramp-test-temporary-file-directory):
Declare default host for mock method.
(tramp-test29-environment-variables-and-port-numbers): New test.

7 years ago; * lisp/net/tls.el (tls-program): Tweak :version.
Glenn Morris [Mon, 22 May 2017 23:08:10 +0000 (19:08 -0400)]
; * lisp/net/tls.el (tls-program): Tweak :version.

; To be reset if no 25.3 happens.

7 years ago* lisp/mail/rfc2047.el (rfc2047-decode-encoded-words): Set `words` to nil.
Stefan Monnier [Mon, 22 May 2017 20:53:18 +0000 (16:53 -0400)]
* lisp/mail/rfc2047.el (rfc2047-decode-encoded-words): Set `words` to nil.

7 years agoFix "g" in hg&git push&pull buffers
Sam Steingold [Mon, 22 May 2017 19:48:21 +0000 (15:48 -0400)]
Fix "g" in hg&git push&pull buffers

lisp/vc/vc-git.el (vc-git--pushpull): Set locally
`compilation-directory' and `compilation-arguments'.
lisp/vc/vc-hg.el (vc-hg--pushpull): Likewise.

7 years agoFix current-line hscrolling in buffers with header-line
Eli Zaretskii [Mon, 22 May 2017 18:15:17 +0000 (21:15 +0300)]
Fix current-line hscrolling in buffers with header-line

* src/xdisp.c (display_line): When testing the glyph row's
vertical position against the cursor position, account for header
line, if any.  (Bug#27014)

7 years ago* lisp/mail/rfc2047.el: Use cl-lib & lexical-binding, silence warning
Stefan Monnier [Mon, 22 May 2017 03:18:58 +0000 (23:18 -0400)]
* lisp/mail/rfc2047.el: Use cl-lib & lexical-binding, silence warning

(rfc2047-decode-encoded-words): Use dolist.
(rfc2047-decode-string): Avoid string-to-multibyte.
(rfc2047-pad-base64): Use pcase.

7 years agoMake ff-find-other-file symmetric for C++ (Bug#20192)
Dima Kogan [Tue, 24 Mar 2015 19:53:08 +0000 (12:53 -0700)]
Make ff-find-other-file symmetric for C++ (Bug#20192)

`cc-other-file-alist' has a mapping of file extensions to switch
between headers and sources, but the mappings weren't completely
symmetric.  In particular .cpp would map to .hh, but .hh would NOT map
to .cpp.

* lisp/find-file.el (cc-other-file-alist): Map ".hh" and ".h" to all
C++ extensions to make them symmetric with the C++ extensions that map
to them.  This lets repeated invocations of `ff-find-other-file'
toggle between all pairs of sources/headers.

7 years agoFix definition of whitespace in JSON
Philipp Stephani [Sat, 20 May 2017 15:49:06 +0000 (17:49 +0200)]
Fix definition of whitespace in JSON

See
https://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00115.html.

* lisp/json.el (json-skip-whitespace): Fix definition.
* test/lisp/json-tests.el (test-json-skip-whitespace): Adapt unit
test.

7 years ago; Spelling fix
Paul Eggert [Sun, 21 May 2017 20:41:43 +0000 (13:41 -0700)]
; Spelling fix

7 years agoImprove module function terminology
Philipp Stephani [Sun, 21 May 2017 20:33:50 +0000 (22:33 +0200)]
Improve module function terminology

Module functions were previously called "function environments" when
the functions created by module_make_functions were lambdas.  Now we
can adapt the terminology and rename "function environments" to
"module functions" everywhere.  This also removes the name clash
between "function environments" and "module environments."

* src/emacs-module.c (module_make_function): Adapt comment to reality;
stop using "function environment" terminology.
(funcall_module): Stop using "function environment" terminology.

7 years agoAvoid uninitialized read
Philipp Stephani [Sat, 20 May 2017 14:57:58 +0000 (16:57 +0200)]
Avoid uninitialized read

* src/nsterm.m (ns_read_socket): Don't read uninitialized variable 'nevents'.

7 years agoFix call of registerServicesMenuSendTypes
Philipp Stephani [Sat, 20 May 2017 14:56:38 +0000 (16:56 +0200)]
Fix call of registerServicesMenuSendTypes

* src/nsterm.m (initFrameFromEmacs:): nil is not allowed for
returnTypes; pass an empty array instead.

7 years agoClean up code around 'ns-list-services'
Philipp Stephani [Sat, 20 May 2017 14:55:00 +0000 (16:55 +0200)]
Clean up code around 'ns-list-services'

* src/nsfns.m (Fns_list_services): Remove unreachable code.  In this
branch NS_IMPL_COCOA cannot be defined.
(interpret_services_menu): Define only if called to avoid compiler
warnings about unused static functions.

7 years agoRemove unused automatic variables
Philipp Stephani [Sat, 20 May 2017 14:52:10 +0000 (16:52 +0200)]
Remove unused automatic variables

* nsterm.m (ns_read_socket):
* macfont.m (macfont_open): Remove unused automatic variables.

7 years agoNextstep: Replace deprecated enumerators
Philipp Stephani [Sat, 20 May 2017 14:50:40 +0000 (16:50 +0200)]
Nextstep: Replace deprecated enumerators

* src/nsmenu.m (initWithContentRect:styleMask:backing:defer:): Replace
deprecated enumerator.

7 years agoNextstep: remove some deprecated method calls
Philipp Stephani [Sat, 20 May 2017 14:49:16 +0000 (16:49 +0200)]
Nextstep: remove some deprecated method calls

* src/nsterm.m (mouseDown:):
* src/nsmenu.m (runMenuAt:forFrame:keymaps:): Remove call to
deprecated method.  The return value is always nil.
* src/macfont.m (mac_font_shape_1): Replace call to deprecated method.

7 years agoRemove trailing semicolons in method definitions
Philipp Stephani [Sat, 20 May 2017 14:47:11 +0000 (16:47 +0200)]
Remove trailing semicolons in method definitions

These semicolons are ignored and cause compiler warnings.

* src/nsimage.m (setPixelAtX:Y:toRed:green:blue:alpha:):
* src/nsterm.m (init, updateFrameSize:):
(setFrame:): Remove trailing semicolon.

7 years agoRemove calls to deprecated setUsesScreenFonts
Philipp Stephani [Sat, 20 May 2017 14:44:40 +0000 (16:44 +0200)]
Remove calls to deprecated setUsesScreenFonts

* src/macfont.m (mac_screen_font_get_metrics): Don't call setUsesScreenFonts.
(mac_font_shape_1): Remove screen_font_p parameter.
(mac_screen_font_shape): Remove screen_font_p argument.

7 years agoMake a function static that isn't used outside this file
Philipp Stephani [Sat, 20 May 2017 14:42:33 +0000 (16:42 +0200)]
Make a function static that isn't used outside this file

* src/kqueue.c (kqueue_directory_listing): Make static.

7 years agoUse NSCharacterCollection instead of CTCharacterCollection
Philipp Stephani [Sat, 20 May 2017 14:39:53 +0000 (16:39 +0200)]
Use NSCharacterCollection instead of CTCharacterCollection

This should not cause behavior changes, but fixes a compiler warning
due to implicit conversions between the enums.

* src/macfont.m (macfont_cache, macfont_lookup_cache)
(macfont_get_glyph_for_cid, macfont_get_uvs_table)
(macfont_variation_glyphs): Use NSCharacterCollection.

7 years agoRemove unused function print_regions
Philipp Stephani [Sat, 20 May 2017 14:38:22 +0000 (16:38 +0200)]
Remove unused function print_regions

7 years agoDeclare Nextstep unexec functions in lisp.h
Philipp Stephani [Sat, 20 May 2017 14:37:42 +0000 (16:37 +0200)]
Declare Nextstep unexec functions in lisp.h

This removes compiler warnings about missing prototypes on macOS.

7 years agoNextstep: Use instancetype explicit return type
Philipp Stephani [Sat, 20 May 2017 14:36:24 +0000 (16:36 +0200)]
Nextstep: Use instancetype explicit return type

This removes compiler warnings on macOS and improves type safety.

* nsterm.m (initFrameFromEmacs:):
(menuDown:):
(toolbarClicked:):
(toggleToolbar:):
(setMiniwindowImage:):
(initFrame:window:):
(condemn, reprieve, setPosition:portion:whole:):
(repeatScroll:):
* nsmenu.m (initWithTitle:):
(initWithTitle:frame:):
(initForView:withIdentifier:):
(init, initWithContentRect:styleMask:backing:defer:):
(initFromContents:isQuestion:):
* nsimage.m (allocInitFromFile:):
(initFromXBM:width:height:fg:bg:):
(setXBMColor:):
(initForXPMWithDepth:width:height:): Use instancetype as return
type instead of implicit id.

7 years ago* lisp/emacs-lisp/package.el (package-delete): Delete readme file as well.
Tino Calancha [Sun, 21 May 2017 13:20:19 +0000 (22:20 +0900)]
* lisp/emacs-lisp/package.el (package-delete): Delete readme file as well.

7 years agoEnhance mode-line percentage offset facility, with "%o" and "%q"
Alan Mackenzie [Sun, 21 May 2017 10:16:09 +0000 (10:16 +0000)]
Enhance mode-line percentage offset facility, with "%o" and "%q"

"%o" will display the percentage "travel" of the window through the buffer.
"%q" will display a combination of the percentage offsets of the top and
bottom of the window.  The new user option mode-line-percent-position will
facilitate selecting a setting for this part of the mode line.

* lisp/bindings.el (mode-line-percent-position): New customizable user option.
(mode-line-position): Use mode-line-percent-position in place of "%p", etc.

* src/xdisp.c (decode_mode_spec): Add handlers for "%o" and "%q".

* doc/lispref/modes.texi (Mode Line Variables): Document
mode-line-percent-position.
(%-Constructs): Document %o and %q.

* etc/NEWS: Add an entry for these new facilities.

7 years agoWork around macOS bug in create_process, too
Paul Eggert [Sun, 21 May 2017 09:00:02 +0000 (02:00 -0700)]
Work around macOS bug in create_process, too

* src/process.c (create_process) [DARWIN_OS]:
Reset SIGCHLD after vfork here, too.

7 years agoWork around macOS bug with vforked child
Paul Eggert [Sun, 21 May 2017 08:46:44 +0000 (01:46 -0700)]
Work around macOS bug with vforked child

* src/callproc.c (call_process) [DARWIN_OS]:
Include workaround for apparent macOS bug.

7 years agoPacify --enable-gcc-warnings without modules
Paul Eggert [Sun, 21 May 2017 08:45:34 +0000 (01:45 -0700)]
Pacify --enable-gcc-warnings without modules

* src/print.c (print_vectorlike): New function, taken from
part of print_object.  This one is indented properly, and
pacifies --enable-gcc-warnings by using a default case
instead of listing all the enum values, sometimes
incompletely.
(print_object): Use it.

7 years agoRemove DARWIN_OS_CASE_SENSITIVE_FIXME code
Paul Eggert [Sun, 21 May 2017 05:55:17 +0000 (22:55 -0700)]
Remove DARWIN_OS_CASE_SENSITIVE_FIXME code

It does not appear to be needed (Bug#24441).
* etc/PROBLEMS: Remove DARWIN_OS_CASE_SENSITIVE_FIXME stuff.
* src/fileio.c (file_name_case_insensitive_p):
Remove DARWIN_OS_CASE_SENSITIVE_FIXME code.

7 years agoNarrow DARWIN_OS_CASE_SENSITIVE_FIXME to 1 choice
Paul Eggert [Sun, 21 May 2017 05:51:32 +0000 (22:51 -0700)]
Narrow DARWIN_OS_CASE_SENSITIVE_FIXME to 1 choice

* etc/PROBLEMS: Document this (Bug#24441).
* src/fileio.c (file_name_case_insensitive_p): Prefer pathconf
with _PC_CASE_SENSITIVE, if it works, to
DARWIN_OS_CASE_SENSITIVE_FIXME code.
Support just one method for DARWIN_OS_CASE_SENSITIVE_FIXME,
which matches the Apple documentation more precisely.

7 years agoFix mhtml-mode fontification bug
Tom Tromey [Sun, 21 May 2017 04:01:15 +0000 (22:01 -0600)]
Fix mhtml-mode fontification bug

Bug#26922
* lisp/textmodes/mhtml-mode.el (mhtml-syntax-propertize): Call
sgml-syntax-propertize-inside if not in a submode.
* test/manual/indent/html-multi-4.html: New file.

7 years agoFix ido-enable-dot-prefix for empty choice (Bug#26997)
Ryan [Fri, 19 May 2017 15:07:57 +0000 (11:07 -0400)]
Fix ido-enable-dot-prefix for empty choice (Bug#26997)

* lisp/ido.el (ido-set-matches-1): Only check first character of
item if it's non-empty.

Copyright-paperwork-exempt: yes

7 years ago* lisp/svg.el (svg-line): Fix x/y typo. (Bug#26953)
Ari Roponen [Sun, 21 May 2017 00:14:36 +0000 (17:14 -0700)]
* lisp/svg.el (svg-line): Fix x/y typo.  (Bug#26953)

7 years agoPrevent loading vc-bzr writing to ~/.bzr.log
Glenn Morris [Sun, 21 May 2017 00:05:18 +0000 (17:05 -0700)]
Prevent loading vc-bzr writing to ~/.bzr.log

* lisp/vc/vc-bzr.el (vc-bzr-status-switches): Disable bzr logging.

7 years agoPrevent running vc-tests writing to ~/.bzr.log
Glenn Morris [Sun, 21 May 2017 00:00:02 +0000 (17:00 -0700)]
Prevent running vc-tests writing to ~/.bzr.log

* test/lisp/vc/vc-tests.el (vc-test--create-repo)
(vc-test--register, vc-test--working-revision)
(vc-test--checkout-model): Set temporary BZR_HOME, to disable logging.

7 years agoDon't end non-hook variable with "-hook" (Bug#26623)
Noam Postavsky [Sat, 20 May 2017 23:11:51 +0000 (19:11 -0400)]
Don't end non-hook variable with "-hook" (Bug#26623)

* lisp/follow.el (follow-inside-post-command-hook-call): Renamed from
follow-inside-post-command-hook, update uses.

7 years agoFix macOS mouse movement
Charles A. Roelli [Thu, 18 May 2017 19:31:46 +0000 (21:31 +0200)]
Fix macOS mouse movement

* lisp/frame.el (ns-set-mouse-absolute-pixel-position): New
function (Lisp).
(set-mouse-absolute-pixel-position): Change it to call
`ns-set-mouse-absolute-pixel-position' on macOS.
* src/nsfns.m (Fns_set_mouse_absolute_pixel_position): New
function.
* src/nsterm.h (NS_PARENT_WINDOW_TOP_POS): Use the primary
screen's height as a base for calculating global coordinates.
* src/nsterm.m (frame_set_mouse_pixel_position): Fix it in macOS.
* test/lisp/mouse-tests.el (bug26816-mouse-frame-movement): Test
movement of mouse relative to frame.

7 years agoShow tooltip on correct screen (bug#26905)
Alan Third [Tue, 16 May 2017 21:36:21 +0000 (22:36 +0100)]
Show tooltip on correct screen (bug#26905)

* src/nsfns.m (compute_tip_xy): Find the correct screen for the
tooltip and constrain it to that screen.

7 years ago; Set transient-mark-mode to let mark-defun tests pass
Noam Postavsky [Sat, 20 May 2017 22:09:24 +0000 (18:09 -0400)]
; Set transient-mark-mode to let mark-defun tests pass

The tests fail when transient-mark-mode is not set since 2017-05-12
"Fix Bug#21072 and rework `mark-defun'".
* test/lisp/progmodes/python-tests.el (python-mark-defun-1)
(python-mark-defun-2): Bind 'transient-mark-mode' to t.

7 years agoDon't save unrelated buffers before recompiling directory (Bug#25964)
Andreas Politz [Sat, 4 Mar 2017 04:58:34 +0000 (05:58 +0100)]
Don't save unrelated buffers before recompiling directory (Bug#25964)

* lisp/emacs-lisp/bytecomp.el (byte-recompile-directory): Only save
buffers visiting lisp files under the directory being compiled.

7 years agoMinor fixes for arity ranges in emacs modules
Paul Eggert [Sat, 20 May 2017 20:43:19 +0000 (13:43 -0700)]
Minor fixes for arity ranges in emacs modules

* src/emacs-module.c (module_make_function):
Check that arities fit into fixnums, for func-arity’s benefit.
(funcall_module): Avoid unnecessary conversion to EMACS_INT.
(module_function_arity): Allow arities greater than SHRT_MAX.

7 years agoReimplement module functions
Philipp Stephani [Sat, 13 May 2017 14:29:40 +0000 (16:29 +0200)]
Reimplement module functions

Instead of a lambda, create a new type containing all data required to
call the function, and support it in the evaluator.  Because this type
now also needs to store the function documentation, it is too big for
Lisp_Misc; use a pseudovector instead.  That also has the nice benefit
that we don't have to add special support to the garbage collector.

Since the new type is user-visible, give it a predicate.

Now we can easily support 'help-function-args' and 'func-arity'; add
unit tests for these.

* src/lisp.h (allocate_module_function, MODULE_FUNCTIONP)
(XMODULE_FUNCTION): New pseudovector type 'module function'.

* src/eval.c (FUNCTIONP): Also treat module functions as functions.
(funcall_lambda, Ffuncall, eval_sub): Add support for calling module
functions.
(Ffunc_arity): Add support for detecting the arity of module
functions.

* src/emacs-module.c (module_make_function): Adapt to new structure.
Return module function object directly instead of wrapping it in a
lambda; remove FIXME.
(funcall_module): New function to call module functions.  Replaces
`internal--module-call' and is called directly from eval.c.
(syms_of_module): Remove internal helper function, which is no longer
needed.
(module_function_arity): New helper function.

* src/data.c (Ftype_of): Adapt to new implementation.
(Fmodule_function_p, syms_of_data): New user-visible function.  Now
that module functions are first-class objects, they deserve a
predicate.  Define it even if not compiled with --enable-modules so
that Lisp code doesn't have to check for the function's existence.

* src/doc.c (Fdocumentation): Support module functions.

* src/print.c (print_object): Adapt to new implementation.

* src/alloc.c (mark_object): Specialized garbage collector support is
no longer needed.

* lisp/help.el (help-function-arglist): Support module functions.
While there, simplify the arity calculation by using `func-arity',
which does the right thing for all kinds of functions.

* test/data/emacs-module/mod-test.c: Amend docstring so we can test
the argument list.

* test/src/emacs-module-tests.el (mod-test-sum-docstring): Adapt to
new docstring.
(mod-test-non-local-exit-signal-test): Because `internal--module-call'
is gone, the backtrace has changed and no longer leaks the
implementation.
(module--func-arity): New test for `func-arity'.
(module--help-function-arglist): New test for `help-function-arglist'.

7 years agoAvoid crashes in GC due to unescaped characters warning
Eli Zaretskii [Sat, 20 May 2017 11:53:06 +0000 (14:53 +0300)]
Avoid crashes in GC due to unescaped characters warning

* src/lread.c (load_warn_unescaped_character_literals): Don't cons
Lisp objects from stack-based variables.  (Bug#26961)

7 years agoNew commands: find-library-other-window, find-library-other-frame
Charles A. Roelli [Sat, 20 May 2017 11:41:53 +0000 (14:41 +0300)]
New commands: find-library-other-window, find-library-other-frame

* lisp/emacs-lisp/find-func.el (find-library-other-window)
(find-library-other-frame): New commands to complement the
existing 'find-library' command.  (Bug#26712)
(read-library-name): New function to read a library name.
* etc/NEWS: Mention 'find-library-other-window' and
'find-library-other-frame'.

7 years agoFix automatic hscrolling of only the current line
Eli Zaretskii [Sat, 20 May 2017 07:32:58 +0000 (10:32 +0300)]
Fix automatic hscrolling of only the current line

* src/xdisp.c (display_line): When hscrolling only the current
line, increment iterator's first_visible_x and last_visible_x
values to account for the hscroll.  This propagates the hscroll
effect on the iterator geometry all the way down to the
subroutines called by display_line, and avoids scrolling bugs
under large hscroll values.  (Bug#26994)

7 years agoAdd handlerlist assertion to module code
Paul Eggert [Fri, 19 May 2017 23:15:07 +0000 (16:15 -0700)]
Add handlerlist assertion to module code

* src/emacs-module.c (module_reset_handlerlist):
Check handlerlist.  Suggested by Philipp Stephani in:
http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00521.html

7 years agoPort --enable-gcc-warnings to clang 3.9.1
Paul Eggert [Fri, 19 May 2017 23:05:31 +0000 (16:05 -0700)]
Port --enable-gcc-warnings to clang 3.9.1

* configure.ac (WERROR_CFLAGS): Omit -Wmissing-braces for Clang,
to shut off a false alarm.  Problem reportd by Philipp Stephani in:
http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00521.html

7 years agoLimit integers printed as characters (Bug#16828)
Noam Postavsky [Mon, 24 Apr 2017 02:30:20 +0000 (22:30 -0400)]
Limit integers printed as characters (Bug#16828)

* lisp/simple.el (eval-expression-print-maximum-character): New
variable.
(eval-expression-print-format): Only display value as character if
it's less than or equal to `eval-expression-print-maximum-character'.
(eval-expression-get-print-arguments): Check
eval-expression-print-maximum-character, allow negative arg to
override it.
(eval-expression):
* lisp/progmodes/elisp-mode.el (elisp--eval-last-sexp):
(elisp--eval-last-sexp-print-value): Handle new variable.
* doc/emacs/building.texi (Lisp Eval): Document new variable and
behavior.
* etc/NEWS: Announce it.
* test/lisp/progmodes/elisp-mode-tests.el
(eval-last-sexp-print-format-small-int)
(eval-last-sexp-print-format-small-int-echo)
(eval-last-sexp-print-format-large-int)
(eval-last-sexp-print-format-large-int-echo):
* test/lisp/simple-tests.el (eval-expression-print-format-small-int)
(eval-expression-print-format-small-int-echo)
(eval-expression-print-format-large-int)
(eval-expression-print-format-large-int-echo): New tests.

7 years agoRefactor lisp eval result printing
Noam Postavsky [Mon, 24 Apr 2017 02:21:42 +0000 (22:21 -0400)]
Refactor lisp eval result printing

* lisp/simple.el (eval-expression-print-format): Don't check
`standard-output' or `current-prefix-arg'.
(eval-expression-get-print-arguments): New function, centralizes
decision about how to print results of `eval-expression' and
`eval-last-sexp'.
(eval-expression):
* lisp/progmodes/elisp-mode.el (elisp--eval-last-sexp-print-value):
Use it.

7 years agoCheck that signed right shift is arithmetic
Paul Eggert [Fri, 19 May 2017 20:43:03 +0000 (13:43 -0700)]
Check that signed right shift is arithmetic

* src/data.c (ash_lsh_impl): Verify that signed right shift is
arithmetic; if we run across a compiler that uses a logical shift
we’ll need to complicate the code before removing this
compile-time check.  Help the compiler do common subexpression
elimination better.

7 years agoMinor .gitignore fixes
Paul Eggert [Fri, 19 May 2017 17:38:22 +0000 (10:38 -0700)]
Minor .gitignore fixes

* .gitignore: modules/mod-test/Makefile was renamed to
test/data/emacs-module/Makefile.
Omit [0-9]*.core, subsumed by *.core.
test/indent/*.new was renamed to test/manual/indent/*.new.
Add *.swp, for Vim.

7 years ago; * doc/emacs/files.texi (Auto Save Files): Fix a cross-reference.
Eli Zaretskii [Fri, 19 May 2017 15:18:04 +0000 (18:18 +0300)]
; * doc/emacs/files.texi (Auto Save Files): Fix a cross-reference.

7 years ago* lisp/emacs-lisp/package.el: Quote `package-desc' in docstrings
Stefan Monnier [Fri, 19 May 2017 13:42:57 +0000 (09:42 -0400)]
* lisp/emacs-lisp/package.el: Quote `package-desc' in docstrings

7 years agoFix turning off whitespace-mode
Nick Helm [Fri, 19 May 2017 12:20:59 +0000 (15:20 +0300)]
Fix turning off whitespace-mode

* lisp/whitespace.el (whitespace-display-char-on): Correct the way
the original buffer-display-table is saved and restored when
global-whitespace-mode is active.  (Bug#26892)

* test/lisp/whitespace-tests.el
(whitespace-tests-whitespace-mode-on): New function.
(whitespace-tests-display-tables): New test.

Copyright-paperwork-exempt: yes

7 years agoMinor tweaks in tramp-tests.el
Michael Albinus [Fri, 19 May 2017 11:57:36 +0000 (13:57 +0200)]
Minor tweaks in tramp-tests.el

* test/lisp/net/tramp-tests.el (tramp--test-afp-or-smb-p): New defun.
(tramp-test05-expand-file-name-relative): Use it.
(tramp-test38-unload): Run only in batch mode.

7 years agoFix a problem with OpenSSH 7 in Tramp
Michael Albinus [Fri, 19 May 2017 11:57:04 +0000 (13:57 +0200)]
Fix a problem with OpenSSH 7 in Tramp

* lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options): Set also
"ConnectTimeout" during test.  Otherwise, OpenSSH 7 will hang.

7 years agoImprove documentation of 'split-string'
Jean-Christophe Helary [Fri, 19 May 2017 11:44:33 +0000 (14:44 +0300)]
Improve documentation of 'split-string'

* doc/lispref/strings.texi (Creating Strings): Rearrange text to
make it more readable.  (Bug#26925)

7 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Fri, 19 May 2017 11:36:43 +0000 (14:36 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

7 years agoFix typos in doc strings
Ruslan Bekenev [Fri, 19 May 2017 11:35:47 +0000 (14:35 +0300)]
Fix typos in doc strings

* lisp/mail/rfc2231.el (rfc2231-encode-string):
* lisp/mail/rfc2047.el (rfc2047-encode-parameter):
* lisp/mail/rfc2045.el (rfc2045-encode-string): Fix typos in doc
strings.  (Bug#26103)

7 years agoFix module tests on some systems
Philipp Stephani [Fri, 19 May 2017 11:26:29 +0000 (13:26 +0200)]
Fix module tests on some systems

If dladdr(3) isn't available or didn't work, the printed
representation of a module function will not include the file name,
but only the address.  Make the tests pass in that case.

* test/src/emacs-module-tests.el (module-function-object): Fix match for
module function printed representation

7 years agoAdd an optional arguments to string-trim
Jean-Christophe Helary [Fri, 19 May 2017 11:27:10 +0000 (14:27 +0300)]
Add an optional arguments to string-trim

* lisp/emacs-lisp/subr-x.el (string-trim-left, string-trim-right)
(string-trim): Add optional args that serve as defaults per the
original behavior.  (Bug#26908)

7 years agoFix typo in last change to auto-hscroll-mode
Stephen Berman [Fri, 19 May 2017 09:36:01 +0000 (11:36 +0200)]
Fix typo in last change to auto-hscroll-mode

* lisp/cus-start.el (standard): Fix typo in value of auto-hscroll-mode.

7 years agoSupport remote editing in emacsclient via Tramp
Eli Zaretskii [Fri, 19 May 2017 08:51:16 +0000 (11:51 +0300)]
Support remote editing in emacsclient via Tramp

* lib-src/emacsclient.c (main, decode_options)
(print_help_and_exit, longopts): New option '--tramp' / '-T' which
specifies how emacs should use tramp to find remote files.

* doc/emacs/misc.texi (TCP Emacs server): New subsection describing
the various knobs to tune server.el for TCP opereation.
(emacsclient Options): Reference "TCP Emacs server" from description of
--server-file.  Document the new '--tramp' / '-T' options.
* doc/emacs/emacs.texi (Top): Update the top-level menu.

* etc/NEWS: Mention the new option.