]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 years agoAdd hexdump/awk file encoding to Tramp. (Bug#35639)
Michael Albinus [Thu, 9 Jan 2020 12:41:10 +0000 (13:41 +0100)]
Add hexdump/awk file encoding to Tramp.  (Bug#35639)

* lisp/net/tramp-sh.el (tramp-hexdump-encode, tramp-hexdump-awk-encode)
(tramp-od-encode, tramp-od-awk-encode): New defconst.
(tramp-awk-encode, tramp-awk-decode): Adapt.
(tramp-awk-coding-test): Remove.
(tramp-remote-coding-commands): Add hexdump/awk encoding.  (Bug#35639)
(tramp-find-inline-encoding): Adapt handling of awk, hexdump and od.
(tramp-get-remote-busybox, tramp-get-remote-awk)
(tramp-get-remote-hexdump, tramp-get-remote-od): New defuns.

4 years agoRemove obsolete thread-alive-p
Michael Albinus [Thu, 9 Jan 2020 12:40:14 +0000 (13:40 +0100)]
Remove obsolete thread-alive-p

* etc/NEWS (thread-alive-p):
* lisp/thread.el (thread-alive-p):
* src/thread.c (thread-alive-p): Remove.

4 years agoMerge from origin/emacs-27
Glenn Morris [Wed, 8 Jan 2020 20:25:58 +0000 (12:25 -0800)]
Merge from origin/emacs-27

1fe596d89f (origin/emacs-27) Fix another compilation problem in a bui...

4 years agoFix another compilation problem in a build without threads
Eli Zaretskii [Wed, 8 Jan 2020 20:00:36 +0000 (22:00 +0200)]
Fix another compilation problem in a build without threads

* src/systhread.c (sys_thread_set_name) [!THREADS_ENABLED]: Add
a trivial implementation.

4 years agoMerge from origin/emacs-27
Glenn Morris [Wed, 8 Jan 2020 19:12:25 +0000 (11:12 -0800)]
Merge from origin/emacs-27

50dc615095 (origin/emacs-27) Fix build without threads

4 years agoFix build without threads
Eli Zaretskii [Wed, 8 Jan 2020 18:53:00 +0000 (20:53 +0200)]
Fix build without threads

* src/systhread.c (sys_thread_create) [!THREADS_ENABLED]: Update
the function's signature to match prototype.  Reported by Glenn
Morris <rgm@gnu.org>.  (Bug#38632)

4 years agoMerge from origin/emacs-27
Glenn Morris [Wed, 8 Jan 2020 17:09:47 +0000 (09:09 -0800)]
Merge from origin/emacs-27

6cd9ccb0a2 (origin/emacs-27) Fix compression of directories in Dired
42329e6d3b ; * etc/NEWS: Review of the whole text.
af5709f16b Further enhancement on `tramp-file-local-name'
fb432446f5 Objective C Mode imenu: cease recognizing "functions" with...
a18373a999 ; * etc/NEWS: Update the text about the XDG_CONFIG_HOME/em...
73fd8a4b53 Fix BSD and macOS builds w.r.t. pthread_setname_np (bug#38...
f54b24304d Scale top-left coordinates in display-monitor-attributes-list
b46c75b16c xref-matches-in-files: Big Tramp speed-up
883b3490d8 * lisp/net/tramp.el (tramp-file-local-name): Remove `save-...
c01f55f126 Fix rendering bug due to unsynchronized cairo surface size...
075f21c0e3 Avoid crash by access to cleared img->pixmap->data/img->ma...
16c6dfb4f1 Avoid assertion violations in very small-height windows
9063124b91 Use pthread_setname_np to set thread name

# Conflicts:
# etc/NEWS
# lisp/net/tramp.el

4 years ago; Merge from origin/emacs-27
Glenn Morris [Wed, 8 Jan 2020 17:03:04 +0000 (09:03 -0800)]
; Merge from origin/emacs-27

The following commit was skipped:

088bfcc2d8 Move “Fix some broken conditional forms” to master

4 years agoFix compression of directories in Dired
Eli Zaretskii [Wed, 8 Jan 2020 16:21:53 +0000 (18:21 +0200)]
Fix compression of directories in Dired

This fixes comporession and uncompression of directories on
MS-Windows, but also on other systems.  The original code used
":" as the REGEXP of the directory entry in
dired-compress-file-suffixes, which on Windows always matched any
absolute file name, and can also match unusual file names on Posix
hosts.  This false match would cause dired-compress-file to act as
if we are decompressing a directory, but use a command suitable
for compression, which would fail in interesting ways.
We now use a REGEXP that can never match any valid file name.

* lisp/dired-aux.el (dired-compress-file-suffixes): Make the
"compress directory" entry's REGEXP really fail to match any valid
file name.
(dired-compress-file): Adapt to the change in
dired-compress-file-suffixes.  (Bug#39024)
(dired-compress): If the current file is a directory, or if the
uncompressed file is a directory, don't remove the original from
the listing, since it is left in the filesystem.

4 years ago; * etc/NEWS: Review of the whole text.
Michael Albinus [Wed, 8 Jan 2020 13:44:18 +0000 (14:44 +0100)]
; * etc/NEWS: Review of the whole text.

4 years agoFurther enhancement on `tramp-file-local-name'
Michael Albinus [Wed, 8 Jan 2020 08:54:04 +0000 (09:54 +0100)]
Further enhancement on `tramp-file-local-name'

* lisp/net/tramp.el (tramp-file-local-name): Call `file-local-name'
if NAME is not a Tramp file name.

4 years agoObjective C Mode imenu: cease recognizing "functions" within comments, etc.
Alan Mackenzie [Tue, 7 Jan 2020 20:07:24 +0000 (20:07 +0000)]
Objective C Mode imenu: cease recognizing "functions" within comments, etc.

This fixes bug #38749.

* lisp/progmodes/cc-menus.el (cc-imenu-objc-function): Put a c-literal-limits
test around the innards of the main re-search-backward loop.

4 years agoFix sxhash-equal on bytecodes, markers, etc.
Paul Eggert [Tue, 7 Jan 2020 19:23:11 +0000 (11:23 -0800)]
Fix sxhash-equal on bytecodes, markers, etc.

Problem reported by Pip Cet (Bug#38912#14).
* doc/lispref/objects.texi (Equality Predicates):
Document better when ‘equal’ looks inside objects.
* doc/lispref/windows.texi (Window Configurations):
Don’t say that ‘equal’ looks inside window configurations.
* etc/NEWS: Mention the change.
* src/fns.c (internal_equal):
Do not look inside window configurations.
(sxhash_obj): Hash markers, byte-code function objects,
char-tables, and font objects consistently with Fequal.
* src/window.c (compare_window_configurations):
Now static.  Remove last argument.  Caller changed.
* test/lisp/ffap-tests.el (ffap-other-window--bug-25352):
Use compare-window-configurations, not ‘equal’.
* test/src/fns-tests.el (test-sxhash-equal): New test.

4 years agoHelp the compiler inline sxhash
Paul Eggert [Tue, 7 Jan 2020 19:23:11 +0000 (11:23 -0800)]
Help the compiler inline sxhash

* src/fns.c (sxhash_obj): Rename from sxhash and make
it static, so that the compiler can inline it better.
(sxhash): New function that does not take a depth arg.
All callers changed.

4 years agoFix NS frame parameters (bug#39000)
Alan Third [Tue, 7 Jan 2020 14:19:01 +0000 (14:19 +0000)]
Fix NS frame parameters (bug#39000)

* src/frame.c (make_frame): Use new system default setting.
* src/frame.h (enum ns_appearance_type): Add new system default
setting.
* src/nsfns.m (Fx_create_frame): Correctly handle Qunbound and support
system default appearance.
(syms_of_nsfns): Add Qlight.
* src/nsterm.h: New method definition.
* src/nsterm.m (ns_set_appearance): Correctly handle Qlight and use new
setAppearance method.
([EmacsView initFrameFromEmacs:]): Use new setAppearance method.
([EmacsWindow setAppearance]): New method.
* doc/lispref/frames.texi (Management Parameters): Document 'light'.

4 years ago; * etc/NEWS: Update the text about the XDG_CONFIG_HOME/emacs behavior.
Eli Zaretskii [Tue, 7 Jan 2020 17:41:02 +0000 (19:41 +0200)]
; * etc/NEWS: Update the text about the XDG_CONFIG_HOME/emacs behavior.

4 years agoFix BSD and macOS builds w.r.t. pthread_setname_np (bug#38632)
Mattias Engdegård [Tue, 7 Jan 2020 16:08:25 +0000 (17:08 +0100)]
Fix BSD and macOS builds w.r.t. pthread_setname_np (bug#38632)

pthread_setname_np takes only a single argument on BSD and macOS,
and affects the current thread only.

* configure.ac: Add check for single-argument pthread_setname_np
* src/systhread.c (sys_thread_set_name): New (w32 and pthread versions).
(sys_thread_create): Remove name argument and name-setting.
(w32_beginthread_wrapper): Remove name-setting.
* src/systhread.h (sys_thread_create, sys_thread_set_name):
Update prototypes.
* src/thread.c (run_thread): Call sys_thread_set_name.
(Fmake_thread): Adapt call to sys_thread_create.
* src/thread.h (struct thread_state): Adjust comment.

4 years agoScale top-left coordinates in display-monitor-attributes-list
Robert Pluim [Tue, 7 Jan 2020 13:41:52 +0000 (14:41 +0100)]
Scale top-left coordinates in display-monitor-attributes-list

When using multiple monitors, and HiDPI, the top-left coordinates of
the monitors need to be adjusted, not just the width and height
(Bug#31223).

* xfns.c (Fx_display_monitor_attributes_list): Scale top-left
coordinates.

4 years agoxref-matches-in-files: Big Tramp speed-up
Dmitry Gutov [Tue, 7 Jan 2020 13:30:25 +0000 (16:30 +0300)]
xref-matches-in-files: Big Tramp speed-up

* lisp/progmodes/xref.el (xref-matches-in-files):
Greatly improve performance with remote files using Tramp
(bug#34343).

4 years agoImplement stderr in tramp-adb-handle-make-process
Michael Albinus [Tue, 7 Jan 2020 12:13:03 +0000 (13:13 +0100)]
Implement stderr in tramp-adb-handle-make-process

* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
Implement `stderr'.

* lisp/net/tramp-sh.el (tramp-sh-handle-make-process):
Flush connection properties in time.

* test/lisp/net/tramp-tests.el (tramp-test30-make-process)
(tramp-test32-shell-command): Test asynchronous stderr for tramp-adb.

4 years ago* lisp/net/tramp.el (tramp-file-local-name): Remove `save-match-data'.
Michael Albinus [Tue, 7 Jan 2020 12:10:35 +0000 (13:10 +0100)]
* lisp/net/tramp.el (tramp-file-local-name): Remove `save-match-data'.

4 years agoFix rendering bug due to unsynchronized cairo surface size (Bug#38497)
YAMAMOTO Mitsuharu [Tue, 7 Jan 2020 03:42:19 +0000 (12:42 +0900)]
Fix rendering bug due to unsynchronized cairo surface size (Bug#38497)

* src/xterm.c (handle_one_xevent) <ConfigureNotify> [USE_CAIRO && !USE_GTK]:
Call x_cr_update_surface_desired_size for a related frame as a fallback.

4 years agoAvoid crash by access to cleared img->pixmap->data/img->mask->data (Bug#38774)
YAMAMOTO Mitsuharu [Tue, 7 Jan 2020 03:32:42 +0000 (12:32 +0900)]
Avoid crash by access to cleared img->pixmap->data/img->mask->data (Bug#38774)

* src/image.c (prepare_image_for_display) [USE_CAIRO]: Call IMAGE_BACKGROUND
and IMAGE_BACKGROUND_TRANSPARENT.

4 years agoAvoid assertion violations in very small-height windows
Eli Zaretskii [Mon, 6 Jan 2020 19:49:24 +0000 (21:49 +0200)]
Avoid assertion violations in very small-height windows

* src/xdisp.c (try_cursor_movement, redisplay_window)
(row_containing_pos): Skip tab-line glyph rows in addition to
header-line rows, when working on the top-most glyph row of a
window.  This avoids assertion violations in set_cursor_from_row.
(Bug#38966)

4 years agoUse pthread_setname_np to set thread name
Robert Pluim [Thu, 19 Dec 2019 16:33:16 +0000 (17:33 +0100)]
Use pthread_setname_np to set thread name

* configure.ac: Remove check for sys/prctl.h and prctl, check for
pthread_setname_np instead.

* systhread.c: Remove sys/prctl.h include.
(sys_thread_create) [HAVE_PTHREAD_SETNAME_NP]: Use pthread_setname_np
to set the name of the newly created thread (Bug#38632).

* thread.c (Fmake_thread): Use ENCODE_SYSTEM instead of
ENCODE_UTF_8 on the thread name.

4 years ago; Adapt tramp-tests.el
Michael Albinus [Mon, 6 Jan 2020 11:24:16 +0000 (12:24 +0100)]
; Adapt tramp-tests.el

* test/lisp/net/tramp-tests.el (tramp-test30-make-process):
(tramp-test32-shell-command): Extend for asynchronous stderr.

4 years ago; Sync with Tramp repository
Michael Albinus [Mon, 6 Jan 2020 11:11:53 +0000 (12:11 +0100)]
; Sync with Tramp repository

* doc/misc/tramp.texi (Frequently Asked Questions): Mention Emacs 28.

* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.4.4-pre".

* lisp/net/tramp-adb.el (tramp-adb-handle-copy-file)
(tramp-adb-handle-rename-file, tramp-adb-handle-process-file):
Use `tramp-file-local-name'.
(tramp-adb-handle-exec-path): Expand `default-directory'.

* lisp/net/tramp-cmds.el (tramp-rename-files):
Use `tramp-file-local-name'.

* lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link)
(tramp-do-copy-or-rename-file-directly)
(tramp-sh-handle-process-file, tramp-set-remote-path)
(tramp-find-inline-encoding, tramp-get-remote-touch):
Use `tramp-file-local-name'.
(tramp-sh-handle-make-process): Support `stderr' as file name.
Delete temporary stderr file.
(tramp-sh-handle-exec-path): Expand `default-directory'.

* lisp/net/tramp-smb.el (tramp-smb-handle-make-symbolic-link)
(tramp-smb-handle-process-file): Use `tramp-file-local-name'.

* lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file)
(tramp-sudoedit-handle-set-file-uid-gid):
Use `tramp-unquote-file-local-name'.
(tramp-sudoedit-handle-make-symbolic-link):
Use `tramp-file-local-name'.
(tramp-sudoedit-handle-file-system-info): Fix a scoping error.

* lisp/net/tramp.el: Bump version to 2.4.4-pre.
(tramp-ignored-file-name-regexp, tramp-time-dont-know)
(tramp-time-doesnt-exist): Fix typo.
(tramp-file-local-name): Extend for non-remote file names.
(tramp-unquote-file-local-name): New defun.
(tramp-completion-make-tramp-file-name): Simplify.
(tramp-set-connection-local-variables-for-buffer)
(tramp-equal-remote, tramp-handle-make-auto-save-file-name):
Use `tramp-tramp-file-p'.
(tramp-handle-file-name-case-insensitive-p)
(tramp-handle-file-truename, tramp-get-remote-tmpdir)
(tramp-make-tramp-temp-file): Use `tramp-file-local-name'.
(tramp-handle-shell-command, tramp-handle-start-file-process):
Implement asynchronous `error-buffer'.

4 years agoMark 'catch' and 'condition-case' bytecodes as obsolete
Mattias Engdegård [Sun, 5 Jan 2020 20:55:20 +0000 (21:55 +0100)]
Mark 'catch' and 'condition-case' bytecodes as obsolete

They have not been generated by the byte-compiler since Emacs 25.

* lisp/emacs-lisp/bytecomp.el (byte-catch, byte-condition-case):
* src/bytecode.c (BYTE_CODES, exec_byte_code):
Mark as obsolete (since Emacs 25; they were still generated in 24.4).

4 years ago; Fix typo in previous patch.
Paul Eggert [Sun, 5 Jan 2020 20:37:36 +0000 (12:37 -0800)]
; Fix typo in previous patch.

4 years agoGo back to iso-2022-7bit for titdic-cnv.el again
Paul Eggert [Sun, 5 Jan 2020 20:29:05 +0000 (12:29 -0800)]
Go back to iso-2022-7bit for titdic-cnv.el again

* admin/notes/unicode: Mention this.
* lisp/international/titdic-cnv.el:
Go back to iso-2022-7bit for this file, since utf-8-emacs unified
characters that tsanq-quick-converter did not want unified.
Problem reported by Eli Zaretskii in:
https://lists.gnu.org/r/emacs-devel/2020-01/msg00156.html

4 years agoMove “Fix some broken conditional forms” to master
Paul Eggert [Sun, 5 Jan 2020 19:48:59 +0000 (11:48 -0800)]
Move “Fix some broken conditional forms” to master

Revert 2020-01-04T19:17:12Z!eggert@cs.ucla.edu
which recently I installed into the emacs-27 branch by mistake.
These patches are now on master instead (via merging).
Do not merge to master.

4 years agoMerge from origin/emacs-27
Paul Eggert [Sun, 5 Jan 2020 19:44:48 +0000 (11:44 -0800)]
Merge from origin/emacs-27

448df8fec7 Improve doc-strings of 'quit-window' and 'quit-restore-win...
7f01dfca56 Fix MH-E bug #470: Show buffer discards text properties
f95a2b8301 Fix some broken conditional forms
28727444f1 Fix a scoping error in tramp-sudoedit.el
6cbdd048bd * lisp/autorevert.el (auto-revert-notify-handler): Fix bra...
076dd1f69a Fix typo in 'window_box_height'

4 years ago; Merge from origin/emacs-27
Paul Eggert [Sun, 5 Jan 2020 19:44:48 +0000 (11:44 -0800)]
; Merge from origin/emacs-27

The following commit was skipped:

e1b3fd3beb Install g++ for CEDET tests

4 years agoMerge from origin/emacs-27
Paul Eggert [Sun, 5 Jan 2020 19:44:48 +0000 (11:44 -0800)]
Merge from origin/emacs-27

05c5bf4d38 * lisp/net/tramp.el: Fix typos.

4 years agoShorten pointer printing code using a small helper function.
Philipp Stephani [Sun, 5 Jan 2020 16:04:17 +0000 (17:04 +0100)]
Shorten pointer printing code using a small helper function.

* src/print.c (print_pointer): New helper function.
(print_vectorlike): Use it.

4 years agoAlso print function data when printing module functions.
Philipp Stephani [Sun, 5 Jan 2020 15:05:14 +0000 (16:05 +0100)]
Also print function data when printing module functions.

This is especially useful in cases where modules only use a single
entry point and use the data to dispatch to the actual function.  Such
a design is common for languages such as Go and C++.

* src/emacs-module.c (module_function_data): New function.

* src/print.c (print_vectorlike): Use it to print module function data
if not NULL.
(print_object): Adapt size of buffer.

* test/data/emacs-module/mod-test.c (emacs_module_init): Pass some
non-NULL data to ‘mod-test-sum’.
(Fmod_test_sum): Check that correct data is passed through.

* test/src/emacs-module-tests.el (mod-test-sum-test)
(module-function-object): Adapt unit tests.

4 years ago; * lisp/x-dnd.el (x-dnd-get-motif-value): Fix typo.
Mattias Engdegård [Sun, 5 Jan 2020 11:22:05 +0000 (12:22 +0100)]
; * lisp/x-dnd.el (x-dnd-get-motif-value): Fix typo.

4 years agoRemove generation of old bytecodes for catch/unwind
Mattias Engdegård [Fri, 3 Jan 2020 12:58:15 +0000 (13:58 +0100)]
Remove generation of old bytecodes for catch/unwind

* lisp/emacs-lisp/bytecomp.el (byte-compile--use-old-handlers)
(byte-compile-condition-case, byte-compile-condition-case--old):
Remove.
(byte-compile-condition-case--new):
Rename to byte-compile-condition-case.
(byte-compile-catch, byte-compile-unwind-protect):
* lisp/emacs-lisp/cconv.el (cconv-convert, cconv-analyze-form):
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
Simplify.

4 years agoImprove doc-strings of 'quit-window' and 'quit-restore-window' (Bug#38819)
Martin Rudalics [Sun, 5 Jan 2020 08:59:01 +0000 (09:59 +0100)]
Improve doc-strings of 'quit-window' and 'quit-restore-window' (Bug#38819)

* lisp/window.el (quit-restore-window, quit-window): Make
doc-strings more consistent; add references to corresponding
section of the Elisp manual (Bug#38819).

4 years ago* lisp/emacs-lisp/bindat.el: Remove obsolete comment.
Paul Eggert [Sun, 5 Jan 2020 03:14:24 +0000 (19:14 -0800)]
* lisp/emacs-lisp/bindat.el: Remove obsolete comment.

4 years ago; Some that->than fixes.
Paul Eggert [Sun, 5 Jan 2020 03:12:41 +0000 (19:12 -0800)]
; Some that->than fixes.

4 years ago* lisp/arc-mode.el (archive-zip-summarize): Remove unused local.
Paul Eggert [Sun, 5 Jan 2020 03:08:39 +0000 (19:08 -0800)]
* lisp/arc-mode.el (archive-zip-summarize): Remove unused local.

4 years agoSimplify x-dnd.el due to bignums
Paul Eggert [Sun, 5 Jan 2020 03:07:02 +0000 (19:07 -0800)]
Simplify x-dnd.el due to bignums

* lisp/x-dnd.el (x-dnd-get-drop-x-y, x-dnd-version-from-flags)
(x-dnd-more-than-3-from-flags, x-dnd-get-motif-value)
(x-dnd-motif-value-to-list): Do not worry about pairs of
16-bit numbers, as the C code no longer generates them;
it generates bignums now, when needed on 32-bit platforms.

4 years agoFix MH-E bug #470: Show buffer discards text properties
Stephen Gildea [Sat, 4 Jan 2020 23:28:07 +0000 (15:28 -0800)]
Fix MH-E bug #470: Show buffer discards text properties

* lisp/mh-e/mh-show.el (mh-display-msg): reset font lock and set
major mode *before* formatting message content.  This changes lets
fonts work when the Show buffer is reused for a new message.
(mh-show-mode): no longer set buffer-read-only; that is better done
by mh-display-msg after setting all content.

4 years ago* lisp/gnus/gnus-start.el (gnus-group-change-level): Simplify
Stefan Monnier [Sat, 4 Jan 2020 23:07:23 +0000 (18:07 -0500)]
* lisp/gnus/gnus-start.el (gnus-group-change-level): Simplify

* lisp/gnus/gnus-group.el (gnus-group-unsubscribe-group): Simplify.

4 years agoFix bug in recent allocate_string_data patch
Paul Eggert [Sat, 4 Jan 2020 21:33:44 +0000 (13:33 -0800)]
Fix bug in recent allocate_string_data patch

Reported by Glenn Morris in:
https://lists.gnu.org/r/emacs-devel/2020-01/msg00098.html
* src/alloc.c (allocate_string_data): If the string is small and
there is not enough room in the current block, clear the string if
CLEARIT.

4 years agoFix some broken conditional forms
Paul Eggert [Sat, 4 Jan 2020 19:17:12 +0000 (11:17 -0800)]
Fix some broken conditional forms

Problem reported by Mattias Engdegård in:
https://lists.gnu.org/r/emacs-devel/2020-01/msg00088.html
* lisp/cedet/ede/cpp-root.el (ede-create-lots-of-projects-under-dir):
Remove this quick hack, which didn’t do anything anyway.
* lisp/cedet/ede/pconf.el (ede-proj-configure-test-required-file):
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-print-col):
* lisp/net/nsm.el (nsm-check-tls-connection):
Use ‘when’ rather than bypassing it.  This doesn’t affect behavior
and is better style.
* lisp/cedet/srecode/semantic.el (srecode-semantic-handle-:tag):
Fix typo that suppressed an error.
* lisp/filesets.el (filesets-run-cmd): Fix typo that mishandled spacing.
* lisp/gnus/gnus-cloud.el (gnus-cloud-update-newsrc-data):
Fix typo that caused “GROUP has older different info in the cloud
as of DATE, update it here?” prompt result to always be treated as
“yes”.
* lisp/gnus/mml-smime.el (mml-smime-openssl-encrypt): Simplify,
since smime-encrypt-buffer signals error on failure.
* lisp/international/titdic-cnv.el (tsang-quick-converter): Simplify.
The conversion of this file to utf-8-emacs in
2019-01-08T02:18:40Z!monnier@iro.umontreal.ca removed the
distinction between Big5 and CNS fulltitles in the generated docstring.
* lisp/org/org-agenda.el (org-agenda-show-and-scroll-up):
* lisp/textmodes/table.el (table--generate-source-cell-contents):
Simplify by removing useless code.
* lisp/org/ox-odt.el (org-odt--format-timestamp): Fix typo that
always output time-of-day even when the timestamp lacked it.

4 years agoFix a scoping error in tramp-sudoedit.el
Michael Albinus [Sat, 4 Jan 2020 13:00:39 +0000 (14:00 +0100)]
Fix a scoping error in tramp-sudoedit.el

* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-system-info):
Fix a scoping error.

4 years agoImprove 'noexcept' support in C++17.
Philipp Stephani [Sat, 4 Jan 2020 12:54:29 +0000 (13:54 +0100)]
Improve 'noexcept' support in C++17.

In C++17, 'noexcept' is part of a function type and may be used in
typedef declarations, see
https://en.cppreference.com/w/cpp/language/noexcept_spec.

* src/emacs-module.h.in: Mark function pointer type aliases as
'noexcept' in C++17.

4 years agoGenerate fewer useless conditionals in cl-loop
Mattias Engdegård [Sat, 4 Jan 2020 12:14:32 +0000 (13:14 +0100)]
Generate fewer useless conditionals in cl-loop

* lisp/emacs-lisp/cl-macs.el (cl--parse-loop-clause):
Don't generate a condition if both branches are the same, which
is the common case.

4 years agoMake module function finalizer test less brittle.
Philipp Stephani [Sat, 4 Jan 2020 11:34:10 +0000 (12:34 +0100)]
Make module function finalizer test less brittle.

* test/src/emacs-module-tests.el (module/function-finalizer): Create
100 leaked functions to increase the probability that at least one
gets garbage-collected.

4 years ago* lisp/autorevert.el (auto-revert-notify-handler): Fix bracketing.
Mattias Engdegård [Fri, 3 Jan 2020 23:01:42 +0000 (00:01 +0100)]
* lisp/autorevert.el (auto-revert-notify-handler): Fix bracketing.

4 years agoFix typo in 'window_box_height'
Martin Rudalics [Sat, 4 Jan 2020 08:43:13 +0000 (09:43 +0100)]
Fix typo in 'window_box_height'

* src/xdisp.c (window_box_height): Add missing 'else'.

4 years agoemacs-module.h: Don't generate invalid C++11 code.
Philipp Stephani [Sat, 4 Jan 2020 02:21:32 +0000 (03:21 +0100)]
emacs-module.h: Don't generate invalid C++11 code.

* src/emacs-module.h.in: Remove 'noexcept' from function pointer type
aliases.  It is illegal there in C++11, see
https://en.cppreference.com/w/cpp/language/noexcept_spec.

4 years agoLet the OS clear new large strings of NUL
Paul Eggert [Sat, 4 Jan 2020 01:14:00 +0000 (17:14 -0800)]
Let the OS clear new large strings of NUL

On my platform, this sped up (make-string 4000000000 0) from 2.5
to 0.015 seconds (not that people should want to do this much :-).
* src/alloc.c (allocate_string_data): New arg CLEARIT.
Callers changed.
(Fmake_string): Prefer calloc to malloc+memset when allocating a
large string of NUL bytes.
(make_clear_string): New function.
(make_uninit_string): Use it.
(make_clear_multibyte_string): New function.
(make_uninit_multibyte_string): Use it.

4 years ago* src/alloc.c (cleanup_vector): Fix --without-modules builds.
Glenn Morris [Fri, 3 Jan 2020 22:26:02 +0000 (14:26 -0800)]
* src/alloc.c (cleanup_vector): Fix --without-modules builds.

4 years agoInstall g++ for CEDET tests
Mattias Engdegård [Fri, 3 Jan 2020 13:08:23 +0000 (14:08 +0100)]
Install g++ for CEDET tests

* .gitlab-ci.yml (before_script): Add g++.
Backport from master.

4 years ago* lisp/net/tramp.el: Fix typos.
Michael Albinus [Fri, 3 Jan 2020 18:33:10 +0000 (19:33 +0100)]
* lisp/net/tramp.el: Fix typos.

4 years agoImplement finalizers for module functions (Bug#30373)
Philipp Stephani [Sun, 11 Feb 2018 20:38:22 +0000 (21:38 +0100)]
Implement finalizers for module functions (Bug#30373)

* src/module-env-28.h: Add new module environment functions to
module environment for Emacs 28.

* src/emacs-module.h.in: Document that 'emacs_finalizer' also works
for function finalizers.

* src/emacs-module.c (CHECK_MODULE_FUNCTION): New function.
(struct Lisp_Module_Function): Add finalizer data member.
(module_make_function): Initialize finalizer.
(module_get_function_finalizer)
(module_set_function_finalizer): New module environment functions.
(module_finalize_function): New function.
(initialize_environment): Initialize new environment functions.

* src/alloc.c (cleanup_vector): Call potential module function
finalizer during garbage collection.

* test/data/emacs-module/mod-test.c (signal_error): New helper
function.
(memory_full): Use it.
(finalizer): New example function finalizer.
(Fmod_test_make_function_with_finalizer)
(Fmod_test_function_finalizer_calls): New test module functions.
(emacs_module_init): Define them.

* test/src/emacs-module-tests.el (module/function-finalizer): New unit
test.

* doc/lispref/internals.texi (Module Functions): Document new
functionality.
(Module Misc): Move description of 'emacs_finalizer' type to 'Module
Functions' node, and add a reference to it.

* etc/NEWS: Mention new functionality.

4 years agoFix the MS-Windows build broken by "Let the OS clear large new objects"
Eli Zaretskii [Fri, 3 Jan 2020 16:27:35 +0000 (18:27 +0200)]
Fix the MS-Windows build broken by "Let the OS clear large new objects"

* src/w32heap.c (sys_calloc): New function, implements calloc
in terms of our private implementations of malloc.

* nt/inc/ms-w32.h (calloc): Redirect to sys_calloc.

4 years agoMerge from origin/emacs-27
Glenn Morris [Fri, 3 Jan 2020 15:50:15 +0000 (07:50 -0800)]
Merge from origin/emacs-27

06364316e0 (origin/emacs-27) * lisp/net/tramp.el (tramp-file-local-na...
d3884f50e0 Adapt commentary in Tramp persistency file
2d82f5a44e Change Tramp version to 2.4.3.27.1
09b65707cc ; * src/dispnew.c (adjust_glyph_matrix): Fix last change.
37f9182b68 Fix redisplay when mode-line-format changes mode-line's he...
1420906b81 * src/fileio.c (Fwrite_region): Improve the doc string.
01dfcb7c87 Fix removal of frame decorations on Windows (Bug#38705)

4 years ago; Merge from origin/emacs-27
Glenn Morris [Fri, 3 Jan 2020 15:50:15 +0000 (07:50 -0800)]
; Merge from origin/emacs-27

The following commit was skipped:

338154240e Fix compilation with GTK versions older than 3

4 years agoMerge from origin/emacs-27
Glenn Morris [Fri, 3 Jan 2020 15:50:15 +0000 (07:50 -0800)]
Merge from origin/emacs-27

071483b6f5 Fix reverting customizations
43203d5068 * lisp/loadup.el: Set max-specpdl-size to 1800 when loadin...
fab3674b36 Revert "Raise default max-specpdl-size value"
42f66aa502 ; Fix NEWS.24
bb9402e6e9 Raise default max-specpdl-size value

4 years ago; Merge from origin/emacs-27
Glenn Morris [Fri, 3 Jan 2020 15:50:15 +0000 (07:50 -0800)]
; Merge from origin/emacs-27

The following commit was skipped:

4011b179ff (emacs-27) ; Auto-commit of loaddefs files.

4 years agoMerge from origin/emacs-27
Glenn Morris [Fri, 3 Jan 2020 15:50:15 +0000 (07:50 -0800)]
Merge from origin/emacs-27

138e9051c7 Update distribution documentation

4 years ago* .gitlab-ci.yml (before_script): Install g++ for CEDET tests.
Mattias Engdegård [Fri, 3 Jan 2020 13:08:23 +0000 (14:08 +0100)]
* .gitlab-ci.yml (before_script): Install g++ for CEDET tests.

4 years ago* lisp/net/tramp.el (tramp-file-local-name): New defun. (Bug#34343)
Michael Albinus [Fri, 3 Jan 2020 12:20:32 +0000 (13:20 +0100)]
* lisp/net/tramp.el (tramp-file-local-name): New defun.  (Bug#34343)

4 years agoAdapt commentary in Tramp persistency file
Michael Albinus [Fri, 3 Jan 2020 12:19:24 +0000 (13:19 +0100)]
Adapt commentary in Tramp persistency file

* lisp/net/tramp-cache.el (tramp-dump-connection-properties):
Adapt commentary in `tramp-persistency-file-name'.

4 years agoChange Tramp version to 2.4.3.27.1
Michael Albinus [Fri, 3 Jan 2020 12:18:52 +0000 (13:18 +0100)]
Change Tramp version to 2.4.3.27.1

* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.4.3.27.1".
(customize-package-emacs-version-alist): Add Tramp version
integrated in Emacs 27.1.

4 years ago; * src/dispnew.c (adjust_glyph_matrix): Fix last change.
Eli Zaretskii [Fri, 3 Jan 2020 08:19:23 +0000 (10:19 +0200)]
; * src/dispnew.c (adjust_glyph_matrix): Fix last change.

4 years agoFix redisplay when mode-line-format changes mode-line's height
Eli Zaretskii [Fri, 3 Jan 2020 07:28:35 +0000 (09:28 +0200)]
Fix redisplay when mode-line-format changes mode-line's height

* lisp/frame.el (top-level): Add mode-line-format,
tab-line-format, and header-line-format to the list of variables
that should trigger an immediate redisplay of the buffer's
window.  This fixes redisplay of windows when the mode line
changes its height.

* src/xdisp.c (window_box_height): Use the window's
mode_line_height, tab_line_height, and header_line_height fields
in preference to CURRENT_MODE_LINE_HEIGHT,
CURRENT_TAB_LINE_HEIGHT, and CURRENT_HEADER_LINE_HEIGHT,
respectively.  This fixes display of vertical scroll bar when the
height of the window's mode line changes.
* src/dispnew.c (adjust_glyph_matrix): When resizing a window's
matrix, reset the mode_line_p flag of the previous mode-line row,
so that the window_box_height, CURRENT_MODE_LINE_HEIGHT, and their
ilk won't use stale info.  (Bug#38828)

4 years agoLet the OS clear large new objects
Paul Eggert [Fri, 3 Jan 2020 02:02:32 +0000 (18:02 -0800)]
Let the OS clear large new objects

Prefer calloc to malloc+memset when allocating large zeroed objects.
This avoids page thrashing when (make-vector 1000000000 nil)
allocates a large nil vector, as Emacs need not touch the
vector’s pages.  This wins on platforms like GNU/Linux where
calloc can fiddle with page tables to create a block of memory
that is lazily zeroed.
* src/alloc.c (lisp_malloc, lmalloc, allocate_vectorlike):
New arg CLEARIT to tell callee whether to use malloc or calloc.
All callers changed.
(allocate_clear_vector, allocate_nil_vector): New functions.
* src/alloc.c (xzalloc, make_vector):
* src/lisp.h (make_nil_vector):
Prefer calloc to malloc + memset(...,0,...).

4 years ago* src/fileio.c (Fwrite_region): Improve the doc string.
Eli Zaretskii [Thu, 2 Jan 2020 17:34:30 +0000 (19:34 +0200)]
* src/fileio.c (Fwrite_region): Improve the doc string.

4 years agoFix removal of frame decorations on Windows (Bug#38705)
Martin Rudalics [Thu, 2 Jan 2020 08:35:49 +0000 (09:35 +0100)]
Fix removal of frame decorations on Windows (Bug#38705)

* src/w32fns.c (w32_set_undecorated): Actualize
f->output_data.w32->dwStyle for subsequent calls of
AdjustWindowRect (Bug#38705).
* src/w32term.h (struct w32_output): Add comment for
dwstyle slot.

4 years agoFix compilation with GTK versions older than 3
Eli Zaretskii [Wed, 1 Jan 2020 17:55:35 +0000 (19:55 +0200)]
Fix compilation with GTK versions older than 3

* src/xfns.c (x_get_net_workarea): Change a recently moved #ifndef
so that GTK builds which need this function will compile it.
Reported by John <jpff@codemist.co.uk>.

(cherry picked from commit d36adb544d984b91c70f6194da01344e4b2b6fc9)

4 years agoFix compilation with GTK versions older than 3
Eli Zaretskii [Wed, 1 Jan 2020 17:55:35 +0000 (19:55 +0200)]
Fix compilation with GTK versions older than 3

* src/xfns.c (x_get_net_workarea): Change a recently moved #ifndef
so that GTK builds which need this function will compile it.
Reported by John <jpff@codemist.co.uk>.

4 years agoFix reverting customizations
Eli Zaretskii [Wed, 1 Jan 2020 17:49:57 +0000 (19:49 +0200)]
Fix reverting customizations

* lisp/custom.el (custom-push-theme): Don't use setcar to modify
the recorded value of PROP; instead, cons a new property list by
deleting the old value and adding the new one.  (Bug#38812)

4 years ago* lisp/loadup.el: Set max-specpdl-size to 1800 when loading cl-generic.el.
Mattias Engdegård [Wed, 1 Jan 2020 16:35:01 +0000 (17:35 +0100)]
* lisp/loadup.el: Set max-specpdl-size to 1800 when loading cl-generic.el.

4 years agoRevert "Raise default max-specpdl-size value"
Mattias Engdegård [Wed, 1 Jan 2020 16:22:35 +0000 (17:22 +0100)]
Revert "Raise default max-specpdl-size value"

This reverts commit bb9402e6e9c12938aee31b81e25511eb1f6335d2.

4 years ago; Fix NEWS.24
Eli Zaretskii [Wed, 1 Jan 2020 16:30:58 +0000 (18:30 +0200)]
; Fix NEWS.24

* etc/NEWS.24: Minor retroactive wording changes and additions to
fix the version shown by Help commands.  (Bug#38844)

4 years agoRaise default max-specpdl-size value
Mattias Engdegård [Wed, 1 Jan 2020 15:35:54 +0000 (16:35 +0100)]
Raise default max-specpdl-size value

Occasionally, loading cl-generic.el from source requires
max_specpdl_size > 1600 when bootstrapping, and thus fails.
In any case we are very close to the limit.

* src/eval.c (init_eval_once): Raise max_specpdl_size to 1800.
* doc/lispref/variables.texi (Local Variables): Update docs.

4 years ago; Auto-commit of loaddefs files.
Glenn Morris [Wed, 1 Jan 2020 14:28:39 +0000 (06:28 -0800)]
; Auto-commit of loaddefs files.

4 years ago; Auto-commit of loaddefs files.
Glenn Morris [Wed, 1 Jan 2020 14:14:47 +0000 (06:14 -0800)]
; Auto-commit of loaddefs files.

4 years agoUpdate distribution documentation
Phillip Lord [Wed, 1 Jan 2020 10:50:14 +0000 (11:50 +0100)]
Update distribution documentation

* admin/nt/README-ftp-server: Remove as obsolete
* admin/nt/dist-build/README-windows-binaries: Add information
  about installer

4 years agoAssume C99-style ‘long long’
Paul Eggert [Wed, 1 Jan 2020 04:15:27 +0000 (04:15 +0000)]
Assume C99-style ‘long long’

Now that Gnulib assumes ‘long long’, it is a good time to clean
out old cruft porting to pre-C99 compilers that lack it.
* src/data.c (ULL_WIDTH, ULL_MAX): Remove.
All uses replaced by ULLONG_WIDTH, ULLONG_MAX.
(bits_word_to_host_endian): Assume ‘unsigned long long’.
By the way, the old code had a performance typo: it used
HAVE_UNSIGNED_LONG_LONG where it should have used
HAVE_UNSIGNED_LONG_LONG_INT.
* src/sysdep.c (ULLONG_MAX): Remove, as lib/limits.h does this now.
(time_from_jiffies) [GNU_LINUX]: Assume ‘long long’.

4 years agoRemove files no longer needed from Gnulib
Paul Eggert [Wed, 1 Jan 2020 04:15:27 +0000 (04:15 +0000)]
Remove files no longer needed from Gnulib

* m4/count-leading-zeros.m4, m4/count-one-bits.m4:
* m4/count-trailing-zeros.m4, m4/longlong.m4:
Remove.

4 years ago* etc/NEWS: Update copyright year.
Paul Eggert [Wed, 1 Jan 2020 03:14:33 +0000 (03:14 +0000)]
* etc/NEWS: Update copyright year.

4 years agoUpdate from gnulib
Paul Eggert [Wed, 1 Jan 2020 03:11:22 +0000 (03:11 +0000)]
Update from gnulib

This incorporates:
2019-12-23 mktime, nstrftime: tweak division performance
2019-12-22 count-leading-zeros: assume 'long long'
2019-12-22 count-one-bits: assume 'long long'
2019-12-22 count-trailing-zeros: assume 'long long'
2019-12-12 inttypes-incomplete: assume 'long long'
2019-12-22 malloca: assume 'long long'
2019-12-22 stdint: assume 'long long'
2019-12-22 strtoll, strtoimax, strtoumax: assume 'long long'
2019-12-22 prefer lib_SOURCES to unconditional AC_LIBOBJ
2019-12-19 nstrftime: avoid a shadowing warning
2019-12-18 improve port of AC_C_RESTRICT to Oracle C++
2019-12-12 stdalign: port to xlclang 16.01
2019-12-11 stddef, unistd: fix compilation error in C++ mode on MSVC
2019-12-08 fix compilation errors in C++ mode on Haiku
2019-12-08 fix compilation errors in 32-bit C++ mode on HP-UX 11/ia64
2019-12-08 fix compilation error in C++ mode on OpenBSD
* build-aux/config.guess, doc/misc/texinfo.tex:
* lib/count-leading-zeros.h, lib/count-one-bits.h:
* lib/count-trailing-zeros.h, lib/inttypes.in.h, lib/malloca.h:
* lib/mktime.c, lib/nstrftime.c, lib/signal.in.h, lib/stdalign.in.h:
* lib/stddef.in.h, lib/stdint.in.h, lib/stdio.in.h, lib/stdlib.in.h:
* lib/strtoimax.c, lib/unistd.in.h, m4/gnulib-common.m4:
* m4/inttypes.m4, m4/largefile.m4, m4/malloca.m4, m4/strtoimax.m4:
* m4/strtoll.m4:
Copy from Gnulib.  Also, change copyright notices in some other
Gnulib-copied files to exactly match Gnulib, as Gnulib updated
them in a trivially different way.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.

4 years agoMerge from origin/emacs-27
Paul Eggert [Wed, 1 Jan 2020 01:08:16 +0000 (01:08 +0000)]
Merge from origin/emacs-27

186152ba40 Pacify gcc -Wunused-function on Ubuntu 18.04.3
4cd143aded Fix copyright years by hand
365e01cc9f Update copyright year to 2020
cd2c156163 ; * etc/NEWS: Make the description of XDG fallback more ac...

# Conflicts:
# etc/NEWS
# etc/refcards/ru-refcard.tex

4 years agoPacify gcc -Wunused-function on Ubuntu 18.04.3
Paul Eggert [Wed, 1 Jan 2020 01:03:14 +0000 (01:03 +0000)]
Pacify gcc -Wunused-function on Ubuntu 18.04.3

This improves on 2019-12-25T20:01:07Z!eggert@cs.ucla.edu,
by fixing a GCC warning on Ubuntu 18.04.3
“‘x_get_net_workarea’ defined but not used”.
* src/xfns.c (x_get_net_workarea) [!USE_GTK]: Do not define.

4 years agoFix copyright years by hand
Paul Eggert [Wed, 1 Jan 2020 01:01:53 +0000 (01:01 +0000)]
Fix copyright years by hand

These are dates that admin/update-copyright did not update.

4 years agoUpdate copyright year to 2020
Paul Eggert [Wed, 1 Jan 2020 00:19:43 +0000 (00:19 +0000)]
Update copyright year to 2020

Run "TZ=UTC0 admin/update-copyright $(git ls-files)".

4 years ago; * etc/NEWS: Make the description of XDG fallback more accurate.
Eli Zaretskii [Tue, 31 Dec 2019 19:28:54 +0000 (21:28 +0200)]
; * etc/NEWS: Make the description of XDG fallback more accurate.

4 years ago; Merge from origin/emacs-27
Glenn Morris [Tue, 31 Dec 2019 15:50:15 +0000 (07:50 -0800)]
; Merge from origin/emacs-27

The following commits were skipped:

195bde9ea8 (origin/emacs-27) Don't always resort in recently introduc...
f2a349ba8d Don't force completion recalculation in icomplete-fido-ret
9b1053ba27 Correctly cache sorted completions in icomplete--sorted-co...
b1c3ed9f32 Move flex style's minibuffer-default-aware sorting to lisp...
e3276f36c0 Make fido-mode behave more like ido-mode when finding dire...
fe0ed17175 Slightly simplify lisp/icomplete.el with new icomplete--ca...
5352947d0d Another adjustment to flex completion style's sorting func...

4 years agoMerge from origin/emacs-27
Glenn Morris [Tue, 31 Dec 2019 15:50:15 +0000 (07:50 -0800)]
Merge from origin/emacs-27

9b6872b4e4 ; * test/lisp/calc/calc-tests.el: Fix warnings
957cdca6f0 Make minibuffer-tests work in out-of-tree builds (bug#38816)
2065316749 Make comint-tests more robust (bug#38813)

4 years agoDon't always resort in recently introduced icomplete--sorted-completions
João Távora [Wed, 25 Dec 2019 19:18:17 +0000 (19:18 +0000)]
Don't always resort in recently introduced icomplete--sorted-completions

Doing so breaks icomplete-forward-completions and
icomplete-backward-completions.

* lisp/icomplete.el (icomplete--sorted-completions): Don't always
resort.

(cherry picked from commit 639fb50ed4c622f99dfbde32fbdbca42ce36d385)

4 years agoDon't force completion recalculation in icomplete-fido-ret
João Távora [Wed, 25 Dec 2019 17:57:20 +0000 (17:57 +0000)]
Don't force completion recalculation in icomplete-fido-ret

Besides the adverse effect of delaying completions, it tripped up the
useful logic of icomplete-force-complete-and-exit in the case where a
default was available, but no completions calculated yet.

* lisp/icomplete.el (icomplete-fido-ret): Don't force calculation
of completions.

(cherry picked from commit 13778aa5be7bf028893672d84c2a291f491d8216)

4 years agoCorrectly cache sorted completions in icomplete--sorted-completions
João Távora [Wed, 25 Dec 2019 17:54:00 +0000 (17:54 +0000)]
Correctly cache sorted completions in icomplete--sorted-completions

* lisp/icomplete.el (icomplete--sorted-completions): Use
completion--cache-all-sorted-completions.

(cherry picked from commit 83587bb68830bd91124f99ddf8590d1d5f63869f)

4 years agoMove flex style's minibuffer-default-aware sorting to lisp/icomplete.el
João Távora [Tue, 24 Dec 2019 10:40:39 +0000 (10:40 +0000)]
Move flex style's minibuffer-default-aware sorting to lisp/icomplete.el

This moves the logic from the series of commits starting in the commit named:

  Improve sorting of flex completion style with non-nil minibuffer-default

to lisp/icomplete.el, so far the only confirmed beneficiary of that
functionality.

* lisp/icomplete.el (icomplete--sorted-completions): Consider
minibuffer-default here.

* lisp/minibuffer.el (completion--flex-adjust-metadata): Simplify.

(cherry picked from commit 0d2a711dc9a65dc8eb6e995369e70cddbcd7d9a4)

4 years agoMake fido-mode behave more like ido-mode when finding directories
João Távora [Mon, 23 Dec 2019 23:43:30 +0000 (23:43 +0000)]
Make fido-mode behave more like ido-mode when finding directories

Notably C-x d (M-x dired) and C-x v d (M-x vc-dir) behaved quite
differently, having regular files as the default instead of ido's
usual "./".

* lisp/icomplete.el (icomplete--sorted-completions): New helper.
(icomplete-completions): Use it.

(cherry picked from commit ee914051fbb4fbff9073a23b5ea7668bf48b5c6a)