]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years agoDon't attempt to display input method guidance in expired minibuffers
Alan Mackenzie [Sun, 31 Jan 2021 11:20:50 +0000 (11:20 +0000)]
Don't attempt to display input method guidance in expired minibuffers

This caused infinite waits in circumstances involving setting an input method
in a global minor mode.  This commit fixes bug #45792.

* lisp/international/quail.el (quail-show-guidance): Test the major mode is
not minibuffer-inactive-mode before proceding with the function.

3 years agoexecute-kbd-macro doc string clarification
Lars Ingebrigtsen [Sun, 31 Jan 2021 07:46:02 +0000 (08:46 +0100)]
execute-kbd-macro doc string clarification

* src/macros.c (Fexecute_kbd_macro): Mention that the buffer is
(potentially) changed (bug#37396).

3 years agoMake operating-system-release obsolete
Lars Ingebrigtsen [Sun, 31 Jan 2021 07:22:12 +0000 (08:22 +0100)]
Make operating-system-release obsolete

* lisp/subr.el (operating-system-release): Make obsolete
(bug#39940).  There are no in-tree usages any more, and the data
doesn't seem all that interesting on its own.

3 years agoDoc string improvements around `default-korean-keyboard'
Lars Ingebrigtsen [Sun, 31 Jan 2021 07:12:10 +0000 (08:12 +0100)]
Doc string improvements around `default-korean-keyboard'

* lisp/language/korea-util.el (default-korean-keyboard): Mention
"Hangul" here for easier discoverability.
(toggle-korean-input-method, quail-hangul-switch-symbol-ksc)
(quail-hangul-switch-hanja): Mention the variable.

3 years agoRevert "Improve fontifying of #| ... |# in `lisp-mode'"
Lars Ingebrigtsen [Sun, 31 Jan 2021 06:59:40 +0000 (07:59 +0100)]
Revert "Improve fontifying of #| ... |# in `lisp-mode'"

This reverts commit 1275dc4711af77c9c223063dcd149d782d497463.

Setting comment-end isn't the correct thing to do -- it makes M-; insert that string.

3 years ago; Fix my previous commit
Stefan Kangas [Sun, 31 Jan 2021 04:41:51 +0000 (05:41 +0100)]
; Fix my previous commit

* lisp/play/5x5.el (5x5-solver-output): Prefer defvar-local.
* lisp/play/gamegrid.el (gamegrid-display-table): Provide default
value.

3 years agoPrefer defvar-local in play/*.el
Stefan Kangas [Sun, 31 Jan 2021 04:27:06 +0000 (05:27 +0100)]
Prefer defvar-local in play/*.el

* lisp/play/5x5.el
(5x5-grid, 5x5-x-pos, 5x5-y-pos, 5x5-moves, 5x5-cracking):
* lisp/play/decipher.el (decipher-alphabet)
(decipher-stats-buffer, decipher-undo-list-size)
(decipher-undo-list):
* lisp/play/gamegrid.el (gamegrid-use-glyphs)
(gamegrid-use-color, gamegrid-font, gamegrid-face)
(gamegrid-display-options, gamegrid-buffer-width)
(gamegrid-buffer-height, gamegrid-blank, gamegrid-timer)
(gamegrid-display-mode, gamegrid-display-table)
(gamegrid-face-table, gamegrid-buffer-start)
(gamegrid-score-file-length):
* lisp/play/snake.el (snake-length, snake-velocity-x)
(snake-velocity-y, snake-positions, snake-score, snake-paused)
(snake-moved-p, snake-velocity-queue):
* lisp/play/tetris.el (tetris-shape, tetris-rot)
(tetris-next-shape, tetris-n-shapes, tetris-n-rows)
(tetris-score, tetris-pos-x, tetris-pos-y, tetris-paused):
Prefer defvar-local.

* lisp/play/5x5.el (5x5-defvar-local): Make obsolete.

3 years agoRemove redundant defvar for artist-mode
Stefan Kangas [Sun, 31 Jan 2021 02:23:29 +0000 (03:23 +0100)]
Remove redundant defvar for artist-mode

* lisp/textmodes/artist.el (artist-mode): Remove redundant
defvar; it is defined by define-minor-mode.

3 years agoPrefer defvar-local in erc
Stefan Kangas [Sun, 31 Jan 2021 02:19:41 +0000 (03:19 +0100)]
Prefer defvar-local in erc

* lisp/erc/erc-backend.el (erc-server-current-nick)
(erc-server-process, erc-session-server, erc-session-connector)
(erc-session-port, erc-server-announced-name)
(erc-server-version, erc-server-parameters)
(erc-server-connected, erc-server-reconnect-count)
(erc-server-quitting, erc-server-reconnecting)
(erc-server-timed-out, erc-server-banned)
(erc-server-error-occurred, erc-server-lines-sent)
(erc-server-last-peers, erc-server-last-sent-time)
(erc-server-last-ping-time, erc-server-last-received-time)
(erc-server-lag, erc-server-filter-data, erc-server-duplicates)
(erc-server-processing-p, erc-server-flood-last-message)
(erc-server-flood-queue, erc-server-flood-timer)
(erc-server-ping-handler):
* lisp/erc/erc-capab.el (erc-capab-identify-activated)
(erc-capab-identify-sent):
* lisp/erc/erc-dcc.el (erc-dcc-byte-count, erc-dcc-entry-data)
(erc-dcc-file-name):
* lisp/erc/erc-ezbounce.el (erc-ezb-session-list):
* lisp/erc/erc-join.el (erc--autojoin-timer):
* lisp/erc/erc-netsplit.el (erc-netsplit-list):
* lisp/erc/erc-networks.el (erc-network):
* lisp/erc/erc-notify.el (erc-last-ison, erc-last-ison-time):
* lisp/erc/erc-ring.el (erc-input-ring, erc-input-ring-index):
* lisp/erc/erc-stamp.el (erc-timestamp-last-inserted)
(erc-timestamp-last-inserted-left)
(erc-timestamp-last-inserted-right):
* lisp/erc/erc.el (erc-session-password, erc-channel-users)
(erc-server-users, erc-channel-topic, erc-channel-modes)
(erc-insert-marker, erc-input-marker, erc-last-saved-position)
(erc-dbuf, erc-active-buffer, erc-default-recipients)
(erc-session-user-full-name, erc-channel-user-limit)
(erc-channel-key, erc-invitation, erc-channel-list)
(erc-bad-nick, erc-logged-in, erc-default-nicks)
(erc-nick-change-attempt-count, erc-send-input-line-function)
(erc-channel-new-member-names, erc-channel-banlist)
(erc-current-message-catalog): Prefer defvar-local.

3 years agoRemove redundant requires of 'derived'
Stefan Kangas [Sun, 31 Jan 2021 02:09:13 +0000 (03:09 +0100)]
Remove redundant requires of 'derived'

* lisp/net/newst-backend.el (derived):
* lisp/net/newst-plainview.el (derived):
* lisp/play/gametree.el (derived):
* lisp/textmodes/less-css-mode.el (derived): Remove redundant require;
'define-derived-mode' is autoloaded.

3 years agoRecompute mode-lines when marking conflicts resolved
Dmitry Gutov [Sun, 31 Jan 2021 01:08:38 +0000 (03:08 +0200)]
Recompute mode-lines when marking conflicts resolved

* lisp/vc/vc.el (vc-mark-resolved):
Recompute the mode lines of the affected files.

3 years agoWith minibuffer-follows-selected-frame `hybrid', preserve recursive Mbuffers
Alan Mackenzie [Sat, 30 Jan 2021 21:16:35 +0000 (21:16 +0000)]
With minibuffer-follows-selected-frame `hybrid', preserve recursive Mbuffers

...when enable-recursive-minibuffers is non-nil, and several minibuffers are
activated from different frames.  Also set the major mode of a reused active
minibuffer to `fundamental-mode' - up till now it's been
minibuffer-inactive-mode.

* src/minibuf.c (read_minibuf): with the indicated settings of variables,
"stack up" all containing minibuffers on the mini-window of the current
frame.  Delete another, now superfluous such stacking up.
(set_minibuffer_mode): New function.
(get_minibuffer): Call the above new function (twice), in place of inline
code, ensuring active minibuffers are never left in minibuffer-inactive-mode.

3 years agoFix NS build broken by a recent change
Eli Zaretskii [Sat, 30 Jan 2021 19:13:53 +0000 (21:13 +0200)]
Fix NS build broken by a recent change

* src/nsmenu.m (set_frame_menubar, Fns_reset_menu): Adapt to
recent changes in set_frame_menubar.  (Bug#45759)

3 years agoAllow the caller to specify own face on suffix in annotation-function
Juri Linkov [Sat, 30 Jan 2021 19:12:37 +0000 (21:12 +0200)]
Allow the caller to specify own face on suffix in annotation-function

* lisp/minibuffer.el (completion--insert-strings):
Don't add 'completions-annotations' face when the caller
specified own face in annotation-function.
Remove no-op code for 'unless prefix' branch.
(completion-metadata, completion-extra-properties):
Update docs of affixation-function.
Suggested by Clemens <clemera@posteo.net> (bug#45780)

* test/lisp/minibuffer-tests.el: Rename package name from
completion-tests.el to minibuffer-tests.el.
Add new test completion--insert-strings-faces.

* doc/lispref/minibuf.texi (Completion Variables)
(Programmed Completion): Update descriptions of
annotation-function and affixation-function.

3 years ago; Improve defcustom :type in last change.
Basil L. Contovounesios [Sat, 30 Jan 2021 19:09:46 +0000 (19:09 +0000)]
; Improve defcustom :type in last change.

3 years agoReduce flicker in Isearch mode
Augusto Stoffel [Wed, 27 Jan 2021 15:09:38 +0000 (16:09 +0100)]
Reduce flicker in Isearch mode

Lazy highlighting now happens immediately when the search string is at
least as long as the value of the new custom variable
`lazy-highlight-no-delay-length`.  Also avoid updating the lazy
count in the echo area too often.
* isearch.el (lazy-highlight-no-delay-length): New defcustom.
* isearch.el (lazy-lazy-count-format): Avoid a momentarily incorrect
count when reversing search direction.
* isearch.el (isearch-lazy-highlight-new-loop): Avoid a call to
`isearch-message` that is quickly succeed by a second echo area
update, thus causing flicker.
* isearch.el (isearch-lazy-highlight-new-loop):
Start lazy highlight immediately if appropriate.
* etc/NEWS: Announce the change.
* doc/emacs/search.texi: Document `lazy-highlight-no-delay-length'.

Copyright-paperwork-exempt: yes

3 years agoRemove unused argument from set_frame_menubar (Bug#45759)
Stefan Kangas [Sat, 30 Jan 2021 14:59:13 +0000 (15:59 +0100)]
Remove unused argument from set_frame_menubar (Bug#45759)

* src/w32menu.c (set_frame_menubar):
* src/xmenu.c (set_frame_menubar): Remove unused argument.
All callers updated.

3 years agoAlso highlight 'conflict' with the warning face
Dmitry Gutov [Sat, 30 Jan 2021 13:42:19 +0000 (15:42 +0200)]
Also highlight 'conflict' with the warning face

* lisp/vc/vc-git.el (vc-git-dir-printer):
Also highlight 'conflict' with the warning face, like
vc-default-dir-printer does already.

3 years ago; Use American spelling in etc/NEWS.
Basil L. Contovounesios [Sat, 30 Jan 2021 13:26:29 +0000 (13:26 +0000)]
; Use American spelling in etc/NEWS.

3 years agoauth-source-search doc string fix
Lars Ingebrigtsen [Sat, 30 Jan 2021 10:10:26 +0000 (11:10 +0100)]
auth-source-search doc string fix

* lisp/auth-source.el (auth-source-search): Fix example (bug#36286).

3 years ago* lisp/tab-line.el (tab-line-new-tab): Use tty menus when supported.
Jared Finder [Tue, 8 Dec 2020 06:44:32 +0000 (22:44 -0800)]
* lisp/tab-line.el (tab-line-new-tab): Use tty menus when supported.

3 years agoNew Rmail option 'rmail-show-message-set-modified'
Eli Zaretskii [Sat, 30 Jan 2021 09:26:07 +0000 (11:26 +0200)]
New Rmail option 'rmail-show-message-set-modified'

* lisp/mail/rmail.el (rmail-show-message-set-modified): New
option.
(rmail-show-message-1): If 'rmail-show-message-set-modified' is
non-nil, don't reset the buffer's modified state.  (Bug#45941)

* etc/NEWS: Announce the new option.

3 years agoFix vc-hg-rename-file on file names like ~/foo/bar
Lars Ingebrigtsen [Sat, 30 Jan 2021 07:59:48 +0000 (08:59 +0100)]
Fix vc-hg-rename-file on file names like ~/foo/bar

* lisp/vc/vc-hg.el (vc-hg-rename-file): Use absolute file names,
because hg doesn't like getting file names like "~/foo/bar"
(bug#36932).

3 years agoFix interaction between two dired cleanup variables
Jeff Spencer [Sat, 30 Jan 2021 07:12:57 +0000 (08:12 +0100)]
Fix interaction between two dired cleanup variables

* lisp/dired.el (dired-clean-up-after-deletion): Kill the buffers
if you have `dired-clean-up-buffers-too' set and
`dired-clean-confirm-killing-deleted-buffers' nil (bug#38037).

Copyright-paperwork-exempt: yes

3 years agoImprove :foreground description in the manual
Lars Ingebrigtsen [Sat, 30 Jan 2021 06:59:30 +0000 (07:59 +0100)]
Improve :foreground description in the manual

* doc/lispref/frames.texi (Font and Color Parameters): Make the
description less confusing (bug#38710).

3 years agoAdd source to sgml-empty-tags
Mauro Aranda [Sat, 30 Jan 2021 06:47:34 +0000 (07:47 +0100)]
Add source to sgml-empty-tags

* lisp/textmodes/sgml-mode.el (html-mode): Add "source" as an empty
tag to fix indentation when this element is present (bug#46181).

3 years agormail-summary-mark-deleted optional argument fix
Lars Ingebrigtsen [Fri, 29 Jan 2021 07:34:43 +0000 (08:34 +0100)]
rmail-summary-mark-deleted optional argument fix

* lisp/mail/rmailsum.el (rmail-summary-mark-deleted): Argument N
is optional, so don't assume that it's a number (bug#39076).

3 years agovc-dir-mode-map: Remove the mouse-2 binding
Dmitry Gutov [Sat, 30 Jan 2021 01:56:27 +0000 (03:56 +0200)]
vc-dir-mode-map: Remove the mouse-2 binding

* lisp/vc/vc-dir.el (vc-dir-mode-map):
Remove the mouse-2 binding (bug#13692).
(vc-dir-mode): Update the docstring accordingly.
(vc-dir-status-mouse-map): New variable.
(vc-default-dir-printer): Use it on the state buttons.

* lisp/vc/vc-git.el (vc-git-dir-printer): Same.

3 years agoUse lexical-binding in mpuz.el
Stefan Kangas [Fri, 29 Jan 2021 23:32:20 +0000 (00:32 +0100)]
Use lexical-binding in mpuz.el

* lisp/play/mpuz.el: Use lexical-binding.  Remove redundant :group
args.
(mpuz-switch-to-window): Minor cleanup.

3 years agoUse lexical-binding in handwrite.el
Stefan Kangas [Fri, 29 Jan 2021 23:10:10 +0000 (00:10 +0100)]
Use lexical-binding in handwrite.el

* lisp/play/handwrite.el: Use lexical-binding.  Remove redundant
:group args.  Minor cleanups.

(handwrite): Minor cleanups.
(handwrite-set-pagenumber-off, handwrite-set-pagenumber-on): Make
comments into docstrings.

3 years ago* test/lisp/electric-tests.el: Fix switch to lexical-binding.
Stefan Monnier [Fri, 29 Jan 2021 21:49:12 +0000 (16:49 -0500)]
* test/lisp/electric-tests.el: Fix switch to lexical-binding.

(define-electric-pair-test): Don't presume that function values are
self-evaluating.

3 years ago; * src/process.c (child_signal_read): Don't report EAGAIN as error
Mattias Engdegård [Fri, 29 Jan 2021 20:15:33 +0000 (21:15 +0100)]
; * src/process.c (child_signal_read): Don't report EAGAIN as error

3 years ago; Silence byte-compiler
Stefan Kangas [Fri, 29 Jan 2021 20:06:02 +0000 (21:06 +0100)]
; Silence byte-compiler

* lisp/net/sasl-ntlm.el (sasl-ntlm-request):
* lisp/net/sasl.el (sasl-plain-response, sasl-login-response-1)
(sasl-login-response-2, sasl-anonymous-response): Fix warnings
introduced by my previous commit.

3 years agoUse lexical-binding in sasl.el and add tests
Stefan Kangas [Fri, 29 Jan 2021 19:11:38 +0000 (20:11 +0100)]
Use lexical-binding in sasl.el and add tests

* lisp/net/sasl.el:
* lisp/net/sasl-digest.el:
* lisp/net/sasl-cram.el:
* lisp/net/sasl-ntlm.el: Use lexical-binding.

* test/lisp/net/sasl-tests.el:
* test/lisp/net/sasl-cram-tests.el: New files.

3 years ago(xref-revert-buffer): Also 'erase-buffer' when handling a user-error
Dmitry Gutov [Fri, 29 Jan 2021 13:53:28 +0000 (15:53 +0200)]
(xref-revert-buffer): Also 'erase-buffer' when handling a user-error

* lisp/progmodes/xref.el (xref-revert-buffer):
Also 'erase-buffer' when handling a user-error (bug#46042).

3 years agoSupport 'operating-system-release' on MS-Windows
Eli Zaretskii [Fri, 29 Jan 2021 11:52:31 +0000 (13:52 +0200)]
Support 'operating-system-release' on MS-Windows

* src/w32fns.c (w32_version_string) [WINDOWSNT]: New function.
* src/w32common.h (w32_version_string) [WINDOWSNT]: Add prototype.
* src/editfns.c (init_editfns) [WINDOWSNT]: Produce a non-nil
string with the OS version.

3 years ago* test/lisp/net/tramp-tests.el (tramp--test-special-characters):
Michael Albinus [Fri, 29 Jan 2021 11:25:36 +0000 (12:25 +0100)]
* test/lisp/net/tramp-tests.el (tramp--test-special-characters):

Adapt test for docker.

3 years agoUse save-mark-and-excursion in query-replace-read-args (bug#45617)
Juri Linkov [Fri, 29 Jan 2021 08:55:16 +0000 (10:55 +0200)]
Use save-mark-and-excursion in query-replace-read-args (bug#45617)

3 years agoFix Bug#45518 in compile.el
Michael Albinus [Fri, 29 Jan 2021 08:44:31 +0000 (09:44 +0100)]
Fix Bug#45518 in compile.el

* lisp/progmodes/compile.el (compilation-get-file-structure):
Avoid call of `file-truename' for remote files.  (Bug#45518)

3 years agoImprove doc string of 'operating-system-release'
Eli Zaretskii [Fri, 29 Jan 2021 07:45:13 +0000 (09:45 +0200)]
Improve doc string of 'operating-system-release'

* src/editfns.c (syms_of_editfns) <operating-system-release>: Doc
fix.  (Bug#39940)

3 years agoFix previous commit regarding revert-buffer-function
Sean Whitton [Fri, 29 Jan 2021 07:18:52 +0000 (08:18 +0100)]
Fix previous commit regarding revert-buffer-function

* simple.el (shell-command, shell-command-on-region): Set
revert-buffer-function buffer-locally, not globally.  Also, avoid an
unnecessary call to (current-buffer) by taking advantage of the
closure (bug#46151).

3 years agoDescribe pointer shapes in the manual
Lars Ingebrigtsen [Fri, 29 Jan 2021 07:16:04 +0000 (08:16 +0100)]
Describe pointer shapes in the manual

* doc/lispref/frames.texi (Pointer Shape): Describe what the
typical pointer shapes are (and add `nhdrag') (bug#39246).

3 years agoAdd a command for redisplay during keyboard macros
Marco Wahl [Fri, 29 Jan 2021 07:01:12 +0000 (08:01 +0100)]
Add a command for redisplay during keyboard macros

* doc/emacs/kmacro.texi (Basic Keyboard Macro): Document it
(bug#39252).

* lisp/kmacro.el (kdb-macro-redisplay): New function.
(kmacro-keymap): Bind it.

3 years agoImprove fontifying of #| ... |# in `lisp-mode'
Lars Ingebrigtsen [Fri, 29 Jan 2021 06:40:06 +0000 (07:40 +0100)]
Improve fontifying of #| ... |# in `lisp-mode'

* lisp/emacs-lisp/lisp-mode.el (lisp-mode): Fontify the end
delimiter in #| ... |# correctly (bug#39820).

3 years agooperating-system-release doc string improvement
Lars Ingebrigtsen [Fri, 29 Jan 2021 06:22:14 +0000 (07:22 +0100)]
operating-system-release doc string improvement

* src/editfns.c (syms_of_editfns): Be more precise about what
`operating-system-release' is (bug#39940).

3 years agoflymake-diagnostic-beg/end doc string and error reporting improvement
Lars Ingebrigtsen [Fri, 29 Jan 2021 06:15:35 +0000 (07:15 +0100)]
flymake-diagnostic-beg/end doc string and error reporting improvement

* lisp/progmodes/flymake.el (flymake-diagnostic-beg):
(flymake-diagnostic-end): Improve doc string and error reporting
(bug#39971).

3 years agoFix position in empty buffers in checkdoc-file-comments-engine
Lars Ingebrigtsen [Fri, 29 Jan 2021 06:04:43 +0000 (07:04 +0100)]
Fix position in empty buffers in checkdoc-file-comments-engine

* lisp/emacs-lisp/checkdoc.el (checkdoc-file-comments-engine):
Don't give invalid positions on empty buffers (bug#39987).

3 years agoSet revert-buffer-function in shell command output buffers
Sean Whitton [Fri, 29 Jan 2021 05:50:38 +0000 (06:50 +0100)]
Set revert-buffer-function in shell command output buffers

* simple.el (shell-command, shell-command-on-region): Set
revert-buffer-function in shell command output buffers (bug#46151).

3 years agoMention using buffer-list-update-hook in recentf-mode
Lars Ingebrigtsen [Fri, 29 Jan 2021 05:46:14 +0000 (06:46 +0100)]
Mention using buffer-list-update-hook in recentf-mode

* lisp/recentf.el (recentf-mode): Mention using
`buffer-list-update-hook' (bug#46153).

3 years agoRemove Emacs 21 compat code from sasl.el
Stefan Kangas [Fri, 29 Jan 2021 03:43:57 +0000 (04:43 +0100)]
Remove Emacs 21 compat code from sasl.el

* lisp/net/sasl.el (sasl-read-passphrase): Remove compat code;
'read-passwd' is preloaded since Emacs 22.

3 years ago* lisp/flow-ctrl.el: Use lexical-binding.
Stefan Kangas [Fri, 29 Jan 2021 01:55:34 +0000 (02:55 +0100)]
* lisp/flow-ctrl.el: Use lexical-binding.

* lisp/flow-ctrl.el (enable-flow-control): Minor cleanup.

3 years agoUse lexical-binding in find-cmd.el and add tests
Stefan Kangas [Fri, 29 Jan 2021 01:47:38 +0000 (02:47 +0100)]
Use lexical-binding in find-cmd.el and add tests

* lisp/find-cmd.el: Use lexical-binding.
* test/lisp/find-cmd-tests.el: New file.

3 years agoSlight gravatar.el code clean up
Lars Ingebrigtsen [Fri, 29 Jan 2021 04:52:51 +0000 (05:52 +0100)]
Slight gravatar.el code clean up

* lisp/image/gravatar.el (gravatar--service-libravatar): Clean the
code up slightly.

3 years agoMerge branch 'master' of git+ssh://git.sv.gnu.org/srv/git/emacs into trunk
Stefan Monnier [Thu, 28 Jan 2021 23:10:29 +0000 (18:10 -0500)]
Merge branch 'master' of git+ssh://git.sv.gnu.org/srv/git/emacs into trunk

3 years agoUse lexical-binding in nroff-mode.el
Stefan Kangas [Thu, 28 Jan 2021 21:06:35 +0000 (22:06 +0100)]
Use lexical-binding in nroff-mode.el

* lisp/textmodes/nroff-mode.el: Use lexical-binding.  Remove
redundant :group args.

3 years ago* lisp/progmodes/bat-mode.el: Use lexical-binding.
Stefan Kangas [Thu, 28 Jan 2021 20:45:26 +0000 (21:45 +0100)]
* lisp/progmodes/bat-mode.el: Use lexical-binding.

3 years ago; Fix my previous commit
Stefan Kangas [Thu, 28 Jan 2021 20:55:31 +0000 (21:55 +0100)]
; Fix my previous commit

* lisp/generic-x.el (generic-mode-ini-file-find-file-hook): Fix my
previous commit; for some reason 'function' produces a warning here
while 'quote' does not.

3 years agoUse lexical-binding in generic-x.el
Stefan Kangas [Thu, 28 Jan 2021 20:35:34 +0000 (21:35 +0100)]
Use lexical-binding in generic-x.el

* lisp/generic-x.el: Use lexical-binding.  Remove redundant :groups.
(generic-rul-mode-setup-function): Prefer setq-local.

3 years agoDefine compat alias obsolete
Stefan Kangas [Thu, 28 Jan 2021 20:28:03 +0000 (21:28 +0100)]
Define compat alias obsolete

* lisp/generic-x.el (generic-mode-ini-file-find-file-hook): Define
compat alias introduced after rename in 22.1 obsolete.

3 years agoUse lexical-binding in all of `lisp/emacs-lisp`
Stefan Monnier [Thu, 28 Jan 2021 19:42:21 +0000 (14:42 -0500)]
Use lexical-binding in all of `lisp/emacs-lisp`

* lisp/emacs-lisp/bindat.el: Use lexical-binding.
(bindat--unpack-group, bindat--length-group, bindat--pack-group):
Declare `last` and `tag` as dyn-scoped.
(bindat-unpack, bindat-pack): Bind `bindat-raw` and `bindat-idx` via
`let` rather than via the formal arglist.

* lisp/emacs-lisp/package-x.el:
* lisp/emacs-lisp/generic.el:
* lisp/emacs-lisp/eieio-opt.el:
* lisp/emacs-lisp/derived.el:
* lisp/emacs-lisp/crm.el: Use lexical-binding.

* lisp/emacs-lisp/helper.el: Use lexical-binding.
(Helper-help-map): Move initialization into declaration.

* lisp/emacs-lisp/regi.el: Use lexical-binding.
(regi-interpret): Remove unused var `tstart`.
Declare `curframe`, `curentry` and `curline` as dyn-scoped.

* lisp/emacs-lisp/shadow.el: Use lexical-binding.
(load-path-shadows-find): Remove unused var `file`.
Tighten a regexp, use `push`.

* lisp/emacs-lisp/tcover-ses.el: Use lexical-binding.  Require `ses`.
Remove correspondingly redundant declarations.
(ses--curcell-overlay): Declare.
(ses-exercise): Use `dlet` and use a properly-prefixed var name.
Fix name of `curcell-overlay` variable.

* lisp/emacs-lisp/unsafep.el: Use lexical-binding.
(unsafep): Bind `unsafep-vars` via `let` rather than via the formal arglist.

3 years agoUse isearch-tmm-menubar when tmm-menubar is called in isearch-mode (bug#43966)
Juri Linkov [Thu, 28 Jan 2021 19:27:26 +0000 (21:27 +0200)]
Use isearch-tmm-menubar when tmm-menubar is called in isearch-mode (bug#43966)

* lisp/isearch.el (isearch-menu-bar-commands): Add tmm-menubar to defaults.
(isearch-mode-map): Remove remapping of tmm-menubar to isearch-tmm-menubar.

* lisp/tmm.el (tmm-menubar): Call isearch-tmm-menubar in isearch-mode.

3 years ago* lisp/wdired.el: Minor doc fixes.
Stefan Kangas [Thu, 28 Jan 2021 18:21:41 +0000 (19:21 +0100)]
* lisp/wdired.el: Minor doc fixes.

3 years agoAvoid recommending Google
Stefan Kangas [Thu, 28 Jan 2021 18:06:18 +0000 (19:06 +0100)]
Avoid recommending Google

* doc/misc/org.texi (Link Abbreviations):
* lisp/net/webjump.el (webjump-sample-sites):
* lisp/org/ol.el (org-link-shell-confirm-function)
(org-link-elisp-confirm-function):
* lisp/org/org.el (org-highlight-links):
* lisp/wdired.el: Avoid recommending Google.

squash! Avoid recommending Google

3 years ago* lisp/leim/quail/viqr.el: Use lexical-binding.
Stefan Kangas [Thu, 28 Jan 2021 17:49:29 +0000 (18:49 +0100)]
* lisp/leim/quail/viqr.el: Use lexical-binding.

3 years ago* lisp/leim/quail/compose.el: Use lexical-binding.
Stefan Kangas [Thu, 28 Jan 2021 17:49:17 +0000 (18:49 +0100)]
* lisp/leim/quail/compose.el: Use lexical-binding.

3 years ago* lisp/ezimage.el: Use lexical-binding.
Stefan Kangas [Thu, 28 Jan 2021 17:35:45 +0000 (18:35 +0100)]
* lisp/ezimage.el: Use lexical-binding.

3 years ago* src/fns.c (hash_string): Fix bug#46111
Stefan Monnier [Thu, 28 Jan 2021 17:27:09 +0000 (12:27 -0500)]
* src/fns.c (hash_string): Fix bug#46111

Use `memcpy` instead of an unaligned memory access.  On x86 at least,
GCC turns this `memcpy` into a single `mov`, so it's about as fast.

3 years agoAdd cross-reference to with-eval-after-load
Stefan Kangas [Thu, 28 Jan 2021 17:16:49 +0000 (18:16 +0100)]
Add cross-reference to with-eval-after-load

* lisp/subr.el (eval-after-load): Doc fix; add cross-reference to
'with-eval-after-load'.

3 years ago* lisp/generic-x.el (hosts-generic-mode): Support IPv6 addresses.
Stefan Kangas [Thu, 28 Jan 2021 16:05:06 +0000 (17:05 +0100)]
* lisp/generic-x.el (hosts-generic-mode): Support IPv6 addresses.

3 years agoAdd missing file systems to etc-fstab-generic-mode
Stefan Kangas [Thu, 28 Jan 2021 14:08:51 +0000 (15:08 +0100)]
Add missing file systems to etc-fstab-generic-mode

* lisp/generic-x.el (etc-fstab-generic-mode): Add entries for missing
file systems.

3 years ago; * lisp/dired-aux.el (dired-compress-files-alist): Minor doc fix.
Stefan Kangas [Sat, 23 Jan 2021 23:53:38 +0000 (00:53 +0100)]
; * lisp/dired-aux.el (dired-compress-files-alist): Minor doc fix.

3 years ago* test/Makefile.in (emacs): Use the C locale
Stefan Monnier [Thu, 28 Jan 2021 17:13:29 +0000 (12:13 -0500)]
* test/Makefile.in (emacs): Use the C locale

This fixes spurious test failures in my environment for
`diff-mode-test-font-lock-syntax-one-line` (where my `diff` otherwise
returns "No newline at end of file" in French) and for
various tests in `emacs-module-tests` because errors signal
"Abandon" instead of "Abort".

3 years ago* lisp/net/ange-ftp.el (ange-ftp-ls): Handle several "--dired" switches.
Michael Albinus [Thu, 28 Jan 2021 14:09:29 +0000 (15:09 +0100)]
* lisp/net/ange-ftp.el (ange-ftp-ls): Handle several "--dired" switches.

3 years agoSimplify auto-revert buffer list by watch descriptor (Bug#44639)
Michael Albinus [Thu, 28 Jan 2021 14:09:18 +0000 (15:09 +0100)]
Simplify auto-revert buffer list by watch descriptor  (Bug#44639)

* lisp/autorevert.el (auto-revert--buffer-by-watch-descriptor):
Rename from `auto-revert--buffers-by-watch-descriptor'.  Make it
an assoc list.
(auto-revert-notify-rm-watch, auto-revert-notify-add-watch)
(auto-revert-notify-handler): Adapt accordingly.  Based on a
patch provided by Spencer Baugh <sbaugh@catern.com>.  (Bug#44639)

3 years agoUse lexical-binding in lisp/{term,nxml,language}
Stefan Monnier [Thu, 28 Jan 2021 13:43:01 +0000 (08:43 -0500)]
Use lexical-binding in lisp/{term,nxml,language}

* test/lisp/electric-tests.el:
* lisp/term/w32console.el:
* lisp/nxml/rng-util.el:
* leim/leim-ext.el: Use lexical-binding.

* lisp/international/titdic-cnv.el (tit-process-header)
(miscdic-convert):
* lisp/international/mule-cmds.el (leim-list-header):
* lisp/international/ja-dic-cnv.el (skkdic-convert):
Use lexical-binding in the generated file.

3 years agoProtect against bad results from libravatar
Lars Ingebrigtsen [Thu, 28 Jan 2021 12:10:45 +0000 (13:10 +0100)]
Protect against bad results from libravatar

* lisp/image/gravatar.el (gravatar--service-libravatar): Don't
have (gravatar-retrieve "foobar@zjp.codes" 'ignore) (which returns
a CNAME) bug out.

3 years agoFix numerical `comment-padding' value
Lars Ingebrigtsen [Thu, 28 Jan 2021 08:57:48 +0000 (09:57 +0100)]
Fix numerical `comment-padding' value

* lisp/newcomment.el (comment-padright): Allow using a number for
`comment-padding', like the doc string says (bug#40056).

3 years agoMake the default `whitespace-enable-predicate' use `derived-mode-p'
Lars Ingebrigtsen [Thu, 28 Jan 2021 07:40:15 +0000 (08:40 +0100)]
Make the default `whitespace-enable-predicate' use `derived-mode-p'

* lisp/whitespace.el (whitespace-enable-predicate): Use
`derived-mode-p' to check modes instead of `eq' (bug#40481).

3 years agoFix fill-paragraph in asm-mode
Mattias M [Thu, 28 Jan 2021 06:34:10 +0000 (07:34 +0100)]
Fix fill-paragraph in asm-mode

* lisp/progmodes/asm-mode.el: The value of fill-prefix ought to be nil
not "\t" so that fill-context-prefix can do its thing. In fact,
fill-prefix does not have to be set at all becuase asm-mode derives
from prog-mode and fill-prefix is set in simple.el.

* test/lisp/progmodes/asm-mode-tests.el: Add relevant test (bug#41064).

Copyright-paperwork-exempt: yes

3 years agoAllow commenting out white space lines in latex-mode
Lars Ingebrigtsen [Thu, 28 Jan 2021 06:09:18 +0000 (07:09 +0100)]
Allow commenting out white space lines in latex-mode

* lisp/newcomment.el (comment-region-default-1): Allow commenting
out whitespace-only regions (bug#41793).

* lisp/textmodes/tex-mode.el (latex--comment-region): Use it.
(latex-mode): Set a comment style shim.

3 years agoFix Gnus icalendar button navigation
Lars Ingebrigtsen [Thu, 28 Jan 2021 05:21:40 +0000 (06:21 +0100)]
Fix Gnus icalendar button navigation

* lisp/gnus/gnus-icalendar.el (gnus-icalendar-insert-button): Mark
buttons correctly for TAB navigation (bug#46135).

3 years agoperl-mode.el: Eliminate keywords which are not in Perl.
Harald Jörg [Thu, 28 Jan 2021 03:22:21 +0000 (04:22 +0100)]
perl-mode.el: Eliminate keywords which are not in Perl.

* lisp/progmodes/perl-mode.el (perl-imenu-generic-expression):
Remove keywords which are not part of Perl.
(perl-font-lock-keywords-2): Remove keywords which are not part of
Perl (bug#46024).  (These keywords are part of Raku; aka. Perl 6.)

3 years agoAllow project/xref packages to be used in Emacs 26.1
João Távora [Thu, 28 Jan 2021 03:18:12 +0000 (04:18 +0100)]
Allow project/xref packages to be used in Emacs 26.1

* lisp/progmodes/project.el: Change Package-Requires to Emacs 26.1
(bug#44671).

* lisp/progmodes/xref.el: Ditto.

3 years ago* lisp/emacs-lisp/macroexp.el (macroexp-if): Fix typo
Stefan Monnier [Wed, 27 Jan 2021 23:53:58 +0000 (18:53 -0500)]
* lisp/emacs-lisp/macroexp.el (macroexp-if): Fix typo

3 years ago* lisp/emacs-lisp/pcase.el (pcase--split-pred): Handle `memq` pred.
Stefan Monnier [Wed, 27 Jan 2021 23:51:09 +0000 (18:51 -0500)]
* lisp/emacs-lisp/pcase.el (pcase--split-pred): Handle `memq` pred.

Improve handling of the `member` tests generated from (or 'a 'b 'c).
This will expand

    (pcase EXP ((and (or 1 2 3) (guard (FOO))) EXP1) (1 EXP2) (6 EXP3))

to

    (cond ((memql '(3 2 1) EXP)
           (cond ((FOO) EXP1) ((eql EXP 1) EXP2)))
          ((eql EXP 6) EXP3))

rather than to

    (cond ((memql '(3 2 1) EXP)
           (cond ((FOO) EXP1) ((eql EXP 1) EXP2) ((eql EXP 6) EXP3)))
          ((eql EXP 1) EXP2)
          ((eql EXP 6) EXP3))

3 years ago* lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Perform β-reduction
Stefan Monnier [Wed, 27 Jan 2021 22:35:28 +0000 (17:35 -0500)]
* lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Perform β-reduction

Also, in `funcall` macroexpand the function before checking to see if
we can remove the `funcall`.

(macroexp-if): Trim trailing `nil` in the generated code while we're at it.

3 years ago* lisp/replace.el (query-replace-read-from-suggestions): New function.
Juri Linkov [Wed, 27 Jan 2021 18:33:13 +0000 (20:33 +0200)]
* lisp/replace.el (query-replace-read-from-suggestions): New function.

(query-replace-read-from): Use it instead of hard-coded '(car search-ring)'.
(read-regexp-suggestions): Add the active region (bug#41692).

3 years ago* admin/notes/unicode: titdic-cnv.el is now utf-8.
Paul Eggert [Wed, 27 Jan 2021 18:10:44 +0000 (10:10 -0800)]
* admin/notes/unicode: titdic-cnv.el is now utf-8.

3 years agoSupport multi-line prompt and contents in previous-line-or-history-element.
Juri Linkov [Wed, 27 Jan 2021 18:08:43 +0000 (20:08 +0200)]
Support multi-line prompt and contents in previous-line-or-history-element.

* lisp/simple.el (previous-line-or-history-element): Move to the
beginning of minibuffer contents if there is editable minibuffer contents
on the same line after moving point to the prompt (bug#46033).
Fix minimal old-column from 0 to 1 to put point at the beginning of
minibuffer contents after going to the previous history element.

3 years ago* lisp/international/titdic-cnv.el (tsang-quick-converter): Simplify
Stefan Monnier [Wed, 27 Jan 2021 17:35:19 +0000 (12:35 -0500)]
* lisp/international/titdic-cnv.el (tsang-quick-converter): Simplify

Merge branches which only differed in the `charset` property of the
strings they intended to return, since that info gets lost later
on anyway.

3 years ago* lisp/international/titdic-cnv.el: Revert to utf-8 encoding
Stefan Monnier [Wed, 27 Jan 2021 17:25:52 +0000 (12:25 -0500)]
* lisp/international/titdic-cnv.el: Revert to utf-8 encoding

While it's true that using the iso-2022-jp encoding on the file does
allow Emacs to render the two strings differently, this only applies to
the source file.  The .elc files all use `utf-8-emacs` encoding anyway,
so that info is lost.  And the difference is even lost before we write
the .elc file because when Emacs byte-compiles that code the
byte-compiler considers those two strings as "equal" and emits only one
string in the byte-code (so the two branches return `eq` strings).

So, I think using `iso-2022-jp` is a bad idea here: it gives the
illusion that the the `charset` info exists, even it will be lost.
Eli discussed it with Handa-san a year ago, and they arrived at the
conclusion that the charset information is indeed no longer important.

3 years agoUse lexical-binding in of all lisp/language
Stefan Monnier [Wed, 27 Jan 2021 02:11:49 +0000 (21:11 -0500)]
Use lexical-binding in of all lisp/language

* lisp/international/titdic-cnv.el (pinyin-convert):
Enable lexical-binding in the generated file(s).

* lisp/language/ethio-util.el: Use lexical-binding.
(ethio-tex-to-fidel-buffer): Use `inhibit-read-only`.  Remove unused
vars `p` and `ch`.

* lisp/language/hanja-util.el: Use lexical-binding.

* lisp/language/ind-util.el: Use lexical-binding.
(indian-translate-region): Actually use the `from` and `to` arguments.
(<toplevel>): Use `dlet`.  Remove unused var `current-repertory`.
(indian-2-column-to-ucs-region): Remove unused var `pos`.

* lisp/language/japan-util.el: Use lexical-binding.
(japanese-katakana-region, japanese-hiragana-region)
(japanese-zenkaku-region): Remove unused var `next`.

* lisp/language/korea-util.el: Use lexical-binding.

* lisp/language/lao-util.el: Use lexical-binding.
(lao-composition-function): Remove unused var `glyph`.

* lisp/language/thai-util.el: Use lexical-binding.
(thai-composition-function): Remove unused var `glyph`.

* lisp/language/thai-word.el: Use lexical-binding.
(thai-forward-word): Remove unused var `tail`.

* lisp/language/tibet-util.el: Use lexical-binding.
(tibetan-add-components): Remove unused var `tmp`.
(tibetan-compose-region): Remove unused vars `str`, `result`, `chars`.

* lisp/language/viet-util.el:
* lisp/language/tv-util.el:
* lisp/language/cyril-util.el:
* lisp/language/china-util.el: Use lexical-binding.

3 years ago; Merge from origin/emacs-27
Glenn Morris [Wed, 27 Jan 2021 15:55:11 +0000 (07:55 -0800)]
; Merge from origin/emacs-27

The following commits were skipped:

e79e377a4e (origin/emacs-27) Improve documentation of 'read-regexp' a...
0340e9eccb read-regexp-suggestions doc string improvement
932aba674c Try to improve the read-regexp doc string
809503431d ; xref-revert-buffer: Drop the (goto-char) at the end
0399cc2ab5 Erase the buffer only after fetching the new contents

3 years agoMerge from origin/emacs-27
Glenn Morris [Wed, 27 Jan 2021 15:55:11 +0000 (07:55 -0800)]
Merge from origin/emacs-27

3443a1c698 Fix last change

3 years ago; Merge from origin/emacs-27
Glenn Morris [Wed, 27 Jan 2021 15:55:11 +0000 (07:55 -0800)]
; Merge from origin/emacs-27

The following commit was skipped:

c8fa056a50 Mention undo-amalgamate-change-group in the lispref manual

3 years agoMerge from origin/emacs-27
Glenn Morris [Wed, 27 Jan 2021 15:55:11 +0000 (07:55 -0800)]
Merge from origin/emacs-27

3f610177ad Avoid sending systemd shutdown notifications if non-daemon
009df5cb3c * src/cmds.c (Fforward_line): Doc fix.  (Bug#46027)
ee1c54ebc0 Improve documentation of sendmail.el defcustom's

3 years ago; Merge from origin/emacs-27
Glenn Morris [Wed, 27 Jan 2021 15:55:11 +0000 (07:55 -0800)]
; Merge from origin/emacs-27

The following commit was skipped:

82c228a017 Don't let `maybe_quit` prevent resetting `consing_until_gc...

3 years agoMerge from origin/emacs-27
Glenn Morris [Wed, 27 Jan 2021 15:55:11 +0000 (07:55 -0800)]
Merge from origin/emacs-27

b58fd1eab9 ; * lisp/language/cham.el: Fix copy-paste mistake in comment.

3 years agoFix display of stretches of whitespace in the display margins
Eli Zaretskii [Wed, 27 Jan 2021 15:52:51 +0000 (17:52 +0200)]
Fix display of stretches of whitespace in the display margins

* src/xdisp.c (produce_stretch_glyph): Truncate the stretch glyph
due to line wrap only when drawing in the text area.
* src/xterm.c (x_draw_stretch_glyph_string):
* src/w32term.c (w32_draw_stretch_glyph_string): Fix the
adjustment of the stretch X and width so that stretch glyphs could
be drawn in the left margin.  Reported by Paul W. Rankin
<pwr@bydasein.com>.

3 years agoSome Tramp fixes
Michael Albinus [Wed, 27 Jan 2021 15:30:49 +0000 (16:30 +0100)]
Some Tramp fixes

* doc/misc/tramp.texi (GVFS-based methods): Ban sftp RemoteCommand
option.

* lisp/net/tramp-adb.el (tramp-adb-handle-copy-file)
(tramp-adb-handle-rename-file): Avoid calling jka-compr when
writing the target file.

* lisp/net/tramp-sh.el (tramp-sh-handle-file-ownership-preserved-p):
Skip GROUP test on *BSD machines.

* test/lisp/net/tramp-tests.el (tramp-test17-insert-directory-one-file):
Skip for tamp-crypt.el.
(tramp--test-sh-no-ls--dired-p): Ignore errors.