1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-05 22:20:24 -08:00
Commit graph

150602 commits

Author SHA1 Message Date
Paul Eggert
68a256c892 Update from Gnulib
Make the following changes by hand, and run 'admin/merge-gnulib'.
* .gitignore: Add lib/malloc/*.gl.h.
* admin/merge-gnulib: Copy lib/af_alg.h and lib/save-cwd.h
directly from Gnulib, without worrying about Gnulib modules,
as these files are special cases.
(AVOIDED_MODULES): Remove malloc-posix.
* lib/malloc.c, lib/realloc.c, m4/malloc.m4, m4/realloc.m4:
* m4/year2038.m4: New files, copied from Gnulib.
* lib/malloca.c, lib/malloca.h:
* m4/close-stream.m4, m4/glibc21.m4, m4/malloca.m4:
Remove.  These are either no longer present in Gnulib, or are no
longer needed by modules that Emacs uses.
* oldXMenu/AddPane.c, oldXmenu/Addsel.c: Include XmenuInt.h first;
needed for new Gnulib.
* src/xmenu.c: Call emacs_abort, not abort.
2021-10-04 15:21:31 -07:00
Andrea Corallo
63cb65dcce * Fix mh tests for native comp builds (bug#50975)
* test/lisp/mh-e/mh-utils-tests.el (mh-ensure-native-trampolines):
New function.
(mh-test-utils-setup-with-mocks)
(mh-test-utils-setup-with-variant): Use it.
2021-10-04 22:49:45 +02:00
Andrea Corallo
e606cc6f40 * Fix `batch-native-compile' not to spawn a subprocess
* lisp/emacs-lisp/comp.el (comp-running-batch-compilation): New var.
(comp-final): Use it.
(batch-native-compile): Bind `comp-running-batch-compilation' it.
2021-10-04 21:55:57 +02:00
Ken Brown
894dfe70da Fix native-compilation build from tarball on Cygwin
* src/Makefile.in (../native-lisp) [CYGWIN]: Rebase the *.eln
files after they are all created, to avoid fork problems later in
the build.  (Bug#50666)
2021-10-04 14:53:46 -04:00
Robert Pluim
2ce5e08058 Remove U+FE0F from script-representative-chars
* lisp/international/fontset.el (script-representative-chars): Remove
U+FE0F / VS-16 from the 'emoji' entry.  It could cause us to skip
fonts that don't have a glyph for it, even though we don't actually
need one.
2021-10-04 19:11:15 +02:00
Robert Pluim
9750e78202 Fix problem with 'vertical-motion' and emoji
* src/font.c (font_range): Pass correct position to
font_for_char (Bug#51012).
2021-10-04 18:56:52 +02:00
Eli Zaretskii
13f459b3ac ; Describe PROBLEMS with Unicode display on some TTYs
* etc/TODO: Describe problems with Unicode display on some
text terminals.  (Bug#50865)  (Bug#50983)
2021-10-04 19:29:34 +03:00
Michael Albinus
7a98a62079 * test/README: Mention :nativecomp tag. 2021-10-04 18:01:06 +02:00
Gregory Heytings
95a0227ff7 Avoid exiting when outputting error messages during loadup
* src/print.c (print_error_message): Don't call
'substitute-command-keys' when it isn't fboundp.
2021-10-04 18:04:20 +03:00
Eli Zaretskii
b7ae0232be ; * src/Makefile.in (../native-lisp): More tweaks of the recipe. 2021-10-04 16:54:37 +03:00
Robert Pluim
6e79f8a444 Remove implemented emoji items
* etc/TODO: Remove implemented emoji items.
2021-10-04 13:17:28 +02:00
Lars Ingebrigtsen
00bcba5125 project.el NEWS tagging 2021-10-04 12:59:31 +02:00
Lars Ingebrigtsen
704a39f508 thing-at-mouse NEWS tagging 2021-10-04 12:57:06 +02:00
Lars Ingebrigtsen
3a9d5f04fb Mention ffap-file-name-with-spaces in the ffap doc strin
* lisp/ffap.el (find-file-at-point): Mention
ffap-file-name-with-spaces in the doc string.
2021-10-04 11:09:38 +02:00
Lars Ingebrigtsen
ef6c43b896 Revert "Make info-look search harder for the Python info file"
This reverts commit 711eb40b9b.

This leads to loading info-look being excessively slow if the info path is long.  It'll be reimplemented in Emacs 29.
2021-10-04 10:23:18 +02:00
Paul Eggert
3b8dda6c90 Add safety check in x_menu_show
* src/xmenu.c (x_menu_show): Explicitly check whether save_wv can
be null here.  Looks like it can be but I am not 100% sure, so
play it safe and add a FIXME comment.
2021-10-03 20:30:55 -07:00
Paul Eggert
e1fb731393 Tweak x_connection_closed when I/O error
* src/xterm.c (x_connection_closed): Don’t dereference dpyinfo
in the unlikely case where it is null and ioerror is true.
This pacifies gcc 11.2.1 -Wanalyzer-null-dereference.
2021-10-03 20:19:38 -07:00
Stefan Kangas
595e506c82
* lisp/erc/erc.el (erc-user-mode): Set "+i" by default. 2021-10-03 23:06:14 -04:00
Paul Eggert
d00f3d4c05 Port unused decls to C2x
* src/conf_post.h (ATTRIBUTE_UNUSED): Remove.  All uses replaced
by MAYBE_UNUSED, and moved to start as needed for C2x.
2021-10-03 20:05:09 -07:00
Stefan Kangas
317eb2d5b5 Improve structure of TODO
* etc/TODO: Various improvements to the document structure according
to discussion with the maintainers.
2021-10-04 03:26:17 +02:00
Stefan Kangas
c0793cd9de Don't use some obsolete names in documentation
* admin/notes/bugtracker: Use non-obsolete name
'mail-dont-reply-to-names'.
* admin/notes/multi-tty: Mention new variable name
'x-selection-value'.
* doc/lispintro/emacs-lisp-intro.texi (Point and mark)
(Point and mark, Design @value{COUNT-WORDS}): Avoid using obsolete
name 'count-lines-region'.
* doc/lispref/hooks.texi (Standard Hooks): Remove reference to
obsolete abnormal hook 'completion-annotate-function'.
* doc/misc/efaq.texi (SPC no longer completes file names): Remove
reference to obsolete 'minibuffer-local-filename-must-match-map';
setting it has no effect.
* doc/misc/gnus.texi (NNTP): Remove reference to obsolete variable
'nntp-authinfo-file'.
* doc/misc/reftex.texi (Table of Contents, Creating Citations)
(Options - Table of Contents, Options - Referencing Labels)
(Options - Creating Citations, Options - Index Support)
(Options - Index Support, Changes): Don't use obsolete names.
* doc/misc/speedbar.texi (Minor Display Modes)
(Major Display Modes): Make variable name suggestions more in line
with existing non-obsolete variable.
* lisp/textmodes/reftex-cite.el (reftex-select-bib-mode-map):
* lisp/textmodes/reftex-ref.el (reftex-offer-label-menu): Don't use
obsolete variable names.
* lisp/progmodes/which-func.el (which-func-mode): Doc fix.
2021-10-04 03:26:11 +02:00
Paul Eggert
87153cc915 Tweak x_hide_tip for consistency
* src/xfns.c (x_hide_tip, Fx_show_tip): Be consistent about using
!NILP (tip_frame) instead of FRAMEP (tip_frame).  The two
expressions are logically equivalent since tip_frame is either a
frame or nil, !NILP is a bit faster, and making things consistent
pacifies gcc 11.2.1 -Wanalyzer-null-dereference.
2021-10-03 17:59:32 -07:00
Paul Eggert
7e871dcd27 Remove encode_terminal_code UNINITs
* src/term.c (encode_terminal_code): Clarify by removing a couple
of UNINITs and testing the local variable ‘cmp’ instead of
retesting src->u.cmp.automatic.  This pacifies gcc 11.2.1
-Wanalyzer-null-dereference.
2021-10-03 17:52:28 -07:00
Paul Eggert
2a00634880 Port pdumper.c maybe_unused to C2x
Port pdumper.c to C2x, and pacify gcc 11.2.1 -Wattributes -Wunused.
* src/pdumper.c (dump_tailq_prepend):
Omit ATTRIBUTE_UNUSED, since it’s always used.
(dump_tailq_append): Remove; unused.
2021-10-03 17:46:00 -07:00
Paul Eggert
6d9b3c0eaa Port systhreads.h to C2x
* src/systhread.h: Put NODISCARD at the start of extern
declarations, not at the end.  This is needed by C2x.
This patch also pacifies gcc 11.2.1 -Wattributes.
2021-10-03 17:32:03 -07:00
Paul Eggert
fd274d7d24 Pacify -Wanalyzer-null-argument in lisp_malloc
* src/alloc.c (lisp_malloc): Document that NBYTES must be
positive, and omit a needless runtime check.  This pacifies a
false alarm with gcc 11.2.1 -Wanalyzer-possible-null-dereference.
2021-10-03 16:55:17 -07:00
Paul Eggert
cc3fc94f09 Pacify gcc 11.2.1 -Wanalyzer-null-argument
* src/gtkutil.c (xg_item_label_same_p): Clarify boolean expression
to pacify -Wanalyzer-null-argument with GCC 11.2.1 20210728
(Red Hat 11.2.1-1).
2021-10-03 16:55:17 -07:00
João Távora
d3a832a61a Simplify hack-read-symbol-shorthands again (bug#50946)
* lisp/loadup.el (load-source-file-function): Don't set twice.

* lisp/shorthands.el (hack-read-symbol-shorthands): Simplify.
(load-with-shorthands-and-code-conversion): Remove.

* lisp/international/mule.el (load-with-code-conversion): Call
hack-read-symbol-shorthands-function.  Set up shorthands.
(hack-read-symbol-shorthands-function): New variable.
2021-10-04 00:17:12 +01:00
Eli Zaretskii
4831426158 Fix recipe for 'native-lisp' directory
* src/Makefile.in (../native-lisp): If the directory native-lisp
exists, do nothing.
2021-10-03 22:35:04 +03:00
Stephen Gildea
0bb42ef803 ; * lisp/time-stamp.el (time-stamp-format): Doc string. 2021-10-03 12:23:31 -07:00
Paul Eggert
732c70a0d9 Simplify socket symlink-attack checking
This is a minor bugfix cleanup (Bug#33847#161).
* lib-src/emacsclient.c: Move "#include <acl.h>" to inside
"#ifdef SOCKETS_IN_FILE_SYSTEM", which is more accurate
and simpler than having a separate "#ifndef WINDOWSNT".
(O_PATH): Likewise.
2021-10-03 11:42:20 -07:00
Eli Zaretskii
fc32a3bd95 ; * doc/lispref/files.texi (Reading from Files): Fix wording. 2021-10-03 21:30:34 +03:00
Alan Mackenzie
3cc77aa976 Clarify (elisp) insert-file-contents with BEG or END not on character boundary
* doc/lispref/files.texi (Reading from files): When the argument BEG or END to
insert-file-contents are at a byte position not at a character boundary,
clarify that raw bytes get inserted, and how to handle this awkwardness in
Lisp.  Also clarify that insert-file-contents-literally is intended to insert
raw bytes into the buffer.  Fix the outdated example that states it inserts
500 characters, when it actually inserts 500 bytes.
2021-10-03 18:13:23 +00:00
Andreas Schwab
5deeb0947d * src/Makefile.in: Simplify conditionals. 2021-10-03 19:46:13 +02:00
Juri Linkov
121a5abeae Move context-menu selection items Defun/List/Symbol to prog-mode (bug#9054)
* lisp/mouse.el (context-menu-functions):
Add context-menu-middle-separator to choices.
(context-menu-region): Move Defun/List/Symbol selection items
to prog-context-menu.

* lisp/progmodes/prog-mode.el (prog-context-menu):
Move Defun/List/Symbol selection items from context-menu-region.
Include text-mode select menu only in strings and comments.

* lisp/textmodes/text-mode.el (text-mode-menu): New function.
(text-mode): Add text-mode-menu to context-menu-functions.
2021-10-03 20:35:49 +03:00
Juri Linkov
0c341e6e84 * lisp/tab-bar.el (tab-bar-detach-tab): Handle frame selected by make-frame.
(tab-bar-move-window-to-tab): New command.
(tab-bar-new-tab-to): Handle the value 'window' of tab-bar-new-tab-choice.
https://lists.gnu.org/archive/html/emacs-devel/2021-09/msg02197.html
2021-10-03 20:16:32 +03:00
Juri Linkov
931a7276c0 * lisp/tab-line.el (tab-line-format): Add face-modified to the cache key.
When tab-line-tab-face-functions contains tab-line-tab-face-modified,
add 'buffer-modified-p' status to the cache-key, so the cache will expire
when the buffer modification status will change.
https://lists.gnu.org/archive/html/emacs-devel/2021-10/msg00129.html
2021-10-03 20:13:29 +03:00
Michael Albinus
3863919a00 Fix unmounting in Tramp
* doc/misc/tramp.texi (FUSE setup): Add tramp-fuse-unmount-on-cleanup.

* lisp/net/tramp.el (tramp-file-name-unify): New defun.
(tramp-file-name-equal-p):
* lisp/net/tramp-cache.el (tramp-get-connection-property)
(tramp-set-connection-property, tramp-flush-connection-property)
(tramp-flush-connection-properties): Use it.

* lisp/net/tramp-fuse.el (tramp-fuse-get-fusermount): New defun.
(tramp-fuse-mount-points): New defvar.
(tramp-fuse-unmount): Use it.  Delete VEC from
`tramp-fuse-mount-points'.  Delete mount point.
(tramp-fuse-unmount-on-cleanup): New user option.
(tramp-fuse-cleanup, tramp-fuse-cleanup-all): New defuns.
(top): Adapt `tramp-fuse-unload-hook',
`tramp-cleanup-connection-hook',
`tramp-cleanup-all-connections-hook' and `kill-emacs-hook'.

* lisp/net/tramp-rclone.el (tramp-rclone-maybe-open-connection):
* lisp/net/tramp-sshfs.el (tramp-sshfs-maybe-open-connection):
Add VEC to `tramp-fuse-mount-points'.

* test/lisp/net/tramp-tests.el (tramp-fuse-unmount-on-cleanup): Declare.
(tramp-test39-make-lock-file-name): Use it.
2021-10-03 18:55:35 +02:00
Stefan Kangas
7a6d34cd1f * etc/themes/light-blue-theme.el: Add "Maintainer: emacs-devel". 2021-10-03 18:33:32 +02:00
Eli Zaretskii
c1b1e1f545 Define HAVE_NATIVE_COMP in src/Makefile.in
* src/Makefile.in (HAVE_NATIVE_COMP): Define.  Reported by Ken
Brown <kbrown@cornell.edu>.
2021-10-03 19:05:49 +03:00
João Távora
137fa2d716 Rename elisp-shorthands to read-symbol-shorthands
The new name fits better in the family of variables that affect
the Lisp reader.

Suggested-by: Po Lu <luangruo@yahoo.com>

* doc/lispref/symbols.texi (Shorthands): Mention read-symbol-shorthands

* lisp/shorthands.el (hack-read-symbol-shorthands)
(hack-read-symbol-shorthands)
(shorthands-font-lock-shorthands): Use read-symbol-shorthands

* lisp/progmodes/elisp-mode.el (elisp--completion-local-symbols)
(elisp--completion-local-symbols)
(elisp-shorthands): Use read-symbol-shorthands

* src/lread.c:
(syms_of_lread): Define Vread_symbol_shorthands
(oblookup_considering_shorthand): Use Vread_symbol_shorthands.

* test/lisp/progmodes/elisp-mode-tests.el (elisp-shorthand-read-buffer):
(elisp-shorthand-read-from-string): Use read-symbol-shorthands

* test/lisp/progmodes/elisp-mode-resources/simple-shorthand-test.el
Use new symbol name read-symbol-shorthands.
2021-10-03 16:18:40 +01:00
João Távora
e6fbc45b7b Font-lock shorthands in elisp-mode for quick visual recognition (bug#50959)
Only the shorthanded prefix is font-locked.  This allows the remainder
of the font-lock logic to subsist (e.g. for macro-defining symbols).

* lisp/shorthands.el (cl-lib): Require it when compiling.
(elisp-shorthand-font-lock-face): New face.
(shorthands--mismatch-from-end): New helper.
(shorthands-font-lock-shorthands): New helper.

* test/lisp/progmodes/elisp-mode-resources/simple-shorthand-test.el:
Add some dummy test code.
2021-10-03 16:18:40 +01:00
Michael Albinus
17e6f3bee5 ; Fix last change in tramp-sshfs.el 2021-10-03 17:01:30 +02:00
Michael Albinus
3dae1e33d1 Suppress superfluous error messages in Tramp
* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-insert-file-contents):
* lisp/net/tramp.el (tramp-handle-insert-file-contents)
(tramp-handle-lock-file): Suppress superfluous error message.
2021-10-03 14:27:26 +02:00
Eli Zaretskii
b228ec9fab Fix reading the tail of a file in shorthands.el
* lisp/shorthands.el (hack-elisp-shorthands): Fix reading past
3000-character limit from EOF.  (Bug#50946)
2021-10-03 14:34:08 +03:00
Lars Ingebrigtsen
7fb2789509 Fix substitution of pretty quotes in code in easy-mmode
* lisp/emacs-lisp/easy-mmode.el (easy-mmode--arg-docstring): Adjust.
(easy-mmode--mode-docstring): Avoid making quotes into pretty
quotes in code (bug#50968).
2021-10-03 11:35:28 +02:00
Lars Ingebrigtsen
b47d7ce1b8 Fix agent directory deletion
* lisp/gnus/gnus-agent.el (gnus-agent-expire-unagentized-dirs):
Delete directories in a simpler way that actually works (bug#50986).
2021-10-03 11:28:34 +02:00
Stefan Kangas
b1a8a66fb0 ; * etc/TODO: Fix previous commit; delete the right thing. 2021-10-03 02:16:15 +02:00
Stefan Kangas
6c01a21365 Clarify the purpose of internal--format-docstring-line
* test/lisp/subr-tests.el (subr-test-internal--format-docstring-line):
* lisp/subr.el (internal--format-docstring-line): Make it more clear
that this function is not intended for the first line of a docstring.
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Add comment explaining
why we use 'internal--format-docstring-line'.
Problem pointed out by Stefan Monnier <monnier@iro.umontreal.ca>.
2021-10-03 01:59:52 +02:00
Juri Linkov
55dadbc57e * lisp/net/dictionary.el (context-menu-dictionary): Move menu item down.
Place the dictionary menu item after middle-separator (bug#50552).
2021-10-02 22:22:41 +03:00