Michael Albinus [Mon, 6 Jun 2016 16:25:28 +0000 (18:25 +0200)]
Some fixes in filenotify-tests.el for cygwin
* test/lisp/filenotify-tests.el (file-notify--test-timeout):
Reintroduce value for cygwin, it's needed on slow systems.
(file-notify--wait-for-events): Move up definition.
(file-notify--test-no-descriptors): Use `file-notify--wait-for-events'.
(file-notify--test-with-events-check, file-notify--test-with-events)
(file-notify-test08-watched-file-in-watched-dir):
Use :random rather than `random.
(file-notify-test06-many-events): Do not skip for cygwin.
Paul Eggert [Thu, 2 Jun 2016 04:00:58 +0000 (21:00 -0700)]
Port angle-bracket TZ settings to MS-Windows
* doc/lispref/os.texi (Time Zone Rules): Document MS-Windows
lack of support for numeric time zone abbreviations.
* src/w32.c (sys_putenv): Convert angle-bracket TZ syntax
to MS-compatible syntax if possible, and to "ZZZ" otherwise.
Problem reported by Kazuhiro Ito (Bug#23600).
Paul Eggert [Wed, 1 Jun 2016 20:25:09 +0000 (13:25 -0700)]
Avoid delving into Git internals for version
* lisp/loadup.el (exec-path): Set it to nil later, so that
emacs-repository-get-version can invoke git commands in the PATH.
* lisp/version.el (emacs-repository--version-git-1): Remove.
(emacs-repository-get-version): Let Git do it rather than
delving into Git internals.
Paul Eggert [Wed, 1 Jun 2016 17:28:43 +0000 (10:28 -0700)]
Fix emacs-repository-get-version with packed .git
* lisp/version.el (emacs-repository-get-version):
Parse .git/packed-refs if it exists.
Problem reported by Martin Rudalics in:
http://lists.gnu.org/archive/html/emacs-devel/2016-05/msg00554.html
K. Handa [Tue, 31 May 2016 22:53:03 +0000 (07:53 +0900)]
Fix incomplete handling of translation table in a coding system.
* coding.c (get_translation): New arg NCHARS. Even if TRANS
is an alist, return a character or a vector of character.
(produce_chars): Adjust for the above change.
(consume_chars): Likewise.
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
Use local `default-directory'. Simplify command to send.
Don't check return code, this was already done in
`tramp-process-actions'.
(tramp-get-inline-coding): Don't set `default-directory'.
* lisp/net/tramp.el (tramp-action-out-of-band):
Throw `out-of-band-failed'.
(tramp-process-actions): Handle `out-of-band-failed'.
(tramp-call-process, tramp-call-process-region):
Use local `default-directory'.
Bill Wohler [Mon, 30 May 2016 23:49:37 +0000 (16:49 -0700)]
Correct cl-flet usage (Bug#22317)
* mh-compat.el: Rename mh-cl-flet to mh-flet and convert alias to
macro using patch from Katsumi Yamaoka <yamaoka@jpl.org>.
* mh-thread.el (mh-thread-set-tables):
* mh-show.el (mh-gnus-article-highlight-citation):
* mh-mime.el (mh-display-with-external-viewer):
(mh-mime-display, mh-press-button, mh-push-button):
(mh-display-emphasis): Call mh-flet instead of mh-cl-flet.
Mike Kupfer [Mon, 30 May 2016 23:13:10 +0000 (16:13 -0700)]
Update MH-E's documentation about HTML renderers
* doc/misc/mh-e.texi (HTML): Remove the footnote with the minimum Gnus
version (we are no longer trying to support multiple Emacs
releases). Sort the table of HTML renderers by name (the previous
ordering was based on a 10-year-old survey). Add shr and gnus-w3m to
the table. Remove the entry for w3 (no longer available). Update
existing entries so that they are more consistent about what features
are discussed, and to reflect recent testing (Debian 8). Small tweaks
to existing text.
Paul Eggert [Mon, 30 May 2016 23:09:25 +0000 (16:09 -0700)]
Omit IF_LINT code that no longer seems needed
Nowadays GCC is smarter, or the Emacs code has mutated, or both,
and now is as good a time as any to remove uses of IF_LINT that
now seem to be unnecessary.
* lib-src/emacsclient.c (set_local_socket):
* lib-src/movemail.c (main) [MAIL_USE_MAILLOCK && HAVE_TOUCHLOCK]:
* src/buffer.c (fix_start_end_in_overlays, fix_overlays_before):
* src/casefiddle.c (casify_region):
* src/charset.c (load_charset_map):
* src/coding.c (decode_coding_object, encode_coding_object):
* src/data.c (Fmake_variable_buffer_local, Fmake_local_variable)
(cons_to_unsigned, cons_to_signed):
* src/frame.c (make_frame, x_set_frame_parameters):
* src/keyboard.c (read_event_from_main_queue):
* src/regex.c (regex_compile):
* src/syntax.c (back_comment):
* src/window.c (Frecenter):
* src/xfaces.c (Fx_list_fonts):
Remove IF_LINT that no longer seems necessary.
* src/image.c (png_load_body, jpeg_load_body): Simplify use of IF_LINT.
* src/keyboard.c (read_char): Use IF_LINT (volatile) rather than
a pragma dance to pacify GCC -Wclobbered.
* src/xdisp.c (x_produce_glyphs): Rewrite to avoid need for IF_LINT.
* src/xterm.c (x_connection_closed): Now _Noreturn, which should
mean we do not need IF_LINT any more.
(x_io_error_quitter): Now _Noreturn. Put an 'assume (false)’
at the end, to forestall warnings from older compilers.
Paul Eggert [Mon, 30 May 2016 23:09:25 +0000 (16:09 -0700)]
Port --enable-gcc-warnings to Cygwin, FreeBSD
These platforms have a bug where _Noreturn is empty when 'lint' is
defined. Problem reported by Ken Brown (Bug#23640).
* configure.ac (GCC_LINT): Rename from 'lint'.
* src/conf_post.h (IF_LINT): Use GCC_LINT, not just 'lint’.
Paul Eggert [Mon, 30 May 2016 23:09:25 +0000 (16:09 -0700)]
Update from gnulib
This incorporates:
2016-05-30 Use GCC_LINT, not lint
2016-05-29 secure_getenv: Port to many more platforms.
* doc/misc/texinfo.tex, lib/secure_getenv.c, lib/verify.h:
* m4/secure_getenv.m4: Copy from gnulib.
Allow preserving EXIF rotations when sending HTML messages
* lisp/gnus/mml.el (mml--possibly-alter-image): Allow image
rotation if you have exiftool installed and the image format
supports it.
(mml-expand-html-into-multipart-related): Use it.
(mml-buffer-substring-no-properties-except-some): Renamed and
copy display properties, too.
* lisp/gnus/message.el (message-toggle-image-thumbnails): Use
`insert-image' instead of `put-image' to make it possible to
edit the resulting text in a sensible manner.
Eli Zaretskii [Sun, 29 May 2016 14:59:59 +0000 (17:59 +0300)]
Clarify doc string of 'file-name-sans-extension'
* lisp/files.el (file-name-sans-extension, file-name-extension):
Clarify in the doc strings what is the extension, and which
leading period doesn't count. (Bug#23643)
Alan Mackenzie [Sun, 29 May 2016 12:22:17 +0000 (12:22 +0000)]
Rationalize the use of c-new-BEG and c-new-END in CC Mode.
Remove the now redundant c-old-BOM and c-old-EOM.
* lisp/progmodes/cc-engine.el (c-macro-cache-syntactic): Change and simplify
meaning.
(c-macro-cache-no-comment): New variable.
(c-invalidate-macro-cache, c-beginning-of-macro, c-end-of-macro): incorporate
the new c-macro-cache-no-comment.
(c-syntactic-end-of-macro): Make better use of c-macro-cache-syntactic.
(c-no-comment-end-of-macro): New function.
* lisp/progmodes/cc-langs.el (c-before-font-lock-functions): Add
c-extend-font-lock-region-for-macros to C/C++/ObjC value.
* lisp/progmodes/cc-mode.el (c-old-BOM, c-old-EOM): Remove.
(c-extend-region-for-CPP): Put results in c-new-BEG/END rather than
c-old-BOM/EOM.
(c-extend-font-lock-region-for-macros): Simplify meaning, no longer returning
a cons for the new region, since the function is now called as an after-change
function. No longer adjust c-new-END for the length of inserted/deleted
text. Move the size restrictions on macros to here from
c-neutralize-syntax-in-and-mark-CPP.
(c-neutralize-syntax-in-and-mark-CPP): No longer adjust c-new-BEG/END here.
Use c-no-comment-end-of-macro rather than c-syntactic-end-of-macro to find the
upper boundary to "neutralize" syntactically obtrusive characters.
(c-change-expand-fl-region): Don't set c-new-END to next BOL when already at
one.
Eli Zaretskii [Sat, 28 May 2016 15:33:50 +0000 (18:33 +0300)]
Fix 'next-line' and 'previous-line' during keyboard macro
* lisp/simple.el (line-move-visual): Handle the case when point
moves outside of the visible portion of the buffer while executing
a keyboard macro. (Bug#13452) (Bug#23551) (Bug#23555)
Eli Zaretskii [Sat, 28 May 2016 12:27:47 +0000 (15:27 +0300)]
Fix the MSDOS build
* msdos/sed1v2.inp (PAXCTL_dumped, PAXCTL_notdumped): Define to
empty, and remove the lines which use them in recipes, as that
causes weird error message from Make and breaks the MSDOS build.
Michael Albinus [Sat, 28 May 2016 10:14:58 +0000 (12:14 +0200)]
Sync with Tramp repository.
* lisp/net/tramp-adb.el (tramp-adb-handle-start-file-process):
* lisp/net/tramp-sh.el (tramp-sh-handle-start-file-process)
* lisp/net/tramp-smb.el (tramp-smb-handle-start-file-process):
Create BUFFER if it doesn't exist. Reported by Nikolay
Kudryavtsev <nikolay.kudryavtsev@gmail.com>.
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-attributes)
(tramp-gvfs-file-attributes-with-gvfs-ls-regexp)
(tramp-gvfs-file-attributes-with-gvfs-info-regexp): New defconst.
(tramp-gvfs-get-directory-attributes)
(tramp-gvfs-get-root-attributes)
(tramp-gvfs-get-file-attributes): New defun.
(tramp-gvfs-handle-file-attributes)
(tramp-gvfs-handle-file-name-all-completions): Use them.
(tramp-gvfs-handle-file-directory-p): Use `file-truename'.
(tramp-gvfs-maybe-open-connection): Set :noquery flag for process.
(tramp-gvfs-send-command): Add locale settings to `process-environment'.
(top): Suppress D-Bus error messages during zeroconf initialization.
* lisp/net/tramp.el (tramp-unknown-id-string)
(tramp-unknown-id-integer): New defconst.
(tramp-check-cached-permissions)
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-attributes)
* lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls)
(tramp-convert-file-attributes, tramp-get-remote-uid)
(tramp-get-remote-gid): Use them.
* lisp/net/tramp-sh.el (tramp-display-escape-sequence-regexp):
Rename from `tramp-color-escape-sequence-regexp'.
(tramp-sh-handle-insert-directory)
(tramp-convert-file-attributes): Adapt callees.
(tramp-device-escape-sequence-regexp): New defconst.
(tramp-wait-for-output): Use it. Reported by Matthías Páll
Gissurarson <icetritlo@gmail.com>.
Paul Eggert [Sat, 28 May 2016 01:16:24 +0000 (18:16 -0700)]
Don’t document declare-function internals
Suggested by Stefan Monnier in:
http://lists.gnu.org/archive/html/emacs-devel/2016-05/msg00618.html
* doc/lispref/functions.texi (Declaring Functions):
* lisp/subr.el (declare-function):
* lisp/emacs-lisp/bytecomp.el:
(byte-compile-macroexpand-declare-function):
Document as (fn file &optional arglist fileonly)
even though it is really (fn file &rest args).
Paul Eggert [Fri, 27 May 2016 20:39:34 +0000 (13:39 -0700)]
Robustify stack-size calculation
* src/emacs.c: Include getpagesize.h.
(main): Check for integer overflow when computing stack size.
Round new rlim_cur to pagesize boundary on all platforms, as this
is easy and would have prevented Bug#23622. If setrlimit
fails, use current limit to determine re_max_failures.
Ken Brown [Fri, 27 May 2016 18:55:34 +0000 (14:55 -0400)]
Adjust filenotify-tests on Cygwin
* test/lisp/filenotify-tests.el (file-notify--test-timeout):
Remove special case for Cygwin.
(file-notify-test07-backup): Update expected results on Cygwin.
Mark Oteiza [Fri, 27 May 2016 01:47:18 +0000 (21:47 -0400)]
Preserve buffer point in windows by default (Bug#4041).
* doc/lispref/windows.texi: Mention new default.
* etc/NEWS: Mention new default.
* lisp/window.el (switch-to-buffer-preserve-window-point): Default to t.
Paul Eggert [Fri, 27 May 2016 02:10:26 +0000 (19:10 -0700)]
Fix byte-compiler pacification for declare-function
Problem reported by Michael Heerdegen in:
http://lists.gnu.org/archive/html/emacs-devel/2016-05/msg00590.html
* lisp/emacs-lisp/bytecomp.el:
(byte-compile-macroexpand-declare-function):
Revert signature to previous value.
* lisp/subr.el (declare-function): Change signature to
match the reverted signature used in the byte compiler.
Paul Eggert [Thu, 26 May 2016 20:02:07 +0000 (13:02 -0700)]
Repair damage from emacs-25 merge
* test/lisp/character-fold-tests.el:
Remove, as it was renamed to test/lisp/char-fold-tests.el.
* test/lisp/emulation/viper-tests.el:
Rename from test/automated/viper-tests.el.
Michael Albinus [Thu, 26 May 2016 17:57:13 +0000 (19:57 +0200)]
Fix Bug#23614.
* lisp/net/tramp-sh.el (tramp-maybe-open-connection):
Let-bind `process-coding-system-alist' in order to suppress
the value for "cmdproxy".
* lisp/net/tramp.el (tramp-encoding-shell):
`w32-shell-name' is a function.
(tramp-encoding-command-switch)
(tramp-encoding-command-interactive): Use `w32-shell-dos-semantics'.
* test/lisp/net/tramp-tests.el (tramp-test24-file-name-completion):
Suppress some tests on MS Windows. (Bug#23614)
Stephen Berman [Thu, 26 May 2016 09:30:29 +0000 (11:30 +0200)]
hl-line.el: Fix flickering of highlighted line (bug#23510)
* lisp/hl-line.el (hl-line-maybe-unhighlight)
(global-hl-line-highlight-all)
(global-hl-line-maybe-unhighlight): New functions.
(hl-line-overlay-buffer): New variable.
(hl-line-mode): Use it. Replace hl-line-unhighlight on
pre-command-hook by hl-line-maybe-unhighlight on
post-command-hook, to prevent hl-line from flickering.
Adjust document string.
(global-hl-line-mode): Use global-hl-line-highlight-all to
simultaneously highlight the current line in all live windows.
Replace global-hl-line-unhighlight on pre-command-hook by
global-hl-line-maybe-unhighlight on post-command-hook, to
prevent global-hl-line from flickering. Remove
global-hl-line-unhighlight from change-major-mode-hook on
disabling the mode. Adjust document string.
Vincent Belaïche [Thu, 26 May 2016 09:03:21 +0000 (11:03 +0200)]
Correct old cell name unbinding when renaming cell.
Bug is to unbind old cell names when renaming a cell with
'makunbound'. when the old cell name is of A1 type, then
'kill-local-variable' must be used instead, so that only the current
spreadsheet is affected. When the old cell name is a renamed cell,
then 'ses--unbind-cell-name' must be used in order to remove the old
name from the name hashmap.
* ses.el (ses-rename-cell): check consistency of cell symbol from
text-property and from array object. Instead of 'makunbound', use
either 'ses--unbind-cell-name' or 'kill-local-variable' depending on
whether the cell old name is a named cell or an A1 type cell
Stefan Monnier [Thu, 26 May 2016 02:58:18 +0000 (22:58 -0400)]
Make autoloads populate a new definition-prefixes table
* lisp/subr.el (definition-prefixes): New hash table.
(register-definition-prefixes): New function.
* lisp/emacs-lisp/autoload.el (autoload-compute-prefixes): New var.
(autoload--split-prefixes-1, autoload--split-prefixes)
(autoload--make-defs-autoload): New functions.
(autoload-defs-autoload-max-size, autoload-popular-prefixes): New vars.
(autoload-generate-file-autoloads): Obey autoload-compute-prefixes.
(update-directory-autoloads): Don't touch loaddefs.el if the set of
autoloads hasn't changed (i.e. if only the timestamp would change).
* lisp/loadup.el: Purify definition-prefixes.
* lisp/w32-fns.el: Keep name space clean.
(w32-set-default-process-coding-system): Rename from
set-default-process-coding-system.
(w32-set-system-coding-system): Rename from set-w32-system-coding-system.