]> git.eshelyaron.com Git - emacs.git/log
emacs.git
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.

3 years ago* lisp/net/dbus.el (dbus-monitor-handler): Disable buffer undo.
Michael Albinus [Wed, 27 Jan 2021 15:30:08 +0000 (16:30 +0100)]
* lisp/net/dbus.el (dbus-monitor-handler): Disable buffer undo.

3 years agoImprove documentation of 'read-regexp' and friends
Eli Zaretskii [Wed, 27 Jan 2021 15:15:46 +0000 (17:15 +0200)]
Improve documentation of 'read-regexp' and friends

* doc/emacs/glossary.texi (Glossary): Add "Tag" to the Glossary.
* doc/emacs/maintaining.texi (Xref): Mention that identifiers are
also known as "tags".

* lisp/replace.el (read-regexp, read-regexp-suggestions): Improve
wording of doc strings.  (Bug#46088)  (Bug#46089)

(cherry picked from commit 49eb03d6c8a181fd46adbbcf1f0a976d0a9efa87)

3 years agoread-regexp-suggestions doc string improvement
Lars Ingebrigtsen [Wed, 27 Jan 2021 02:47:02 +0000 (03:47 +0100)]
read-regexp-suggestions doc string improvement

* lisp/replace.el (read-regexp-suggestions): Add a link to the
manual to explain what a tag is (bug#46089).

(cherry picked from commit f9cc2d48246fe8370e9286866e6115ba8e2acf44)

3 years agoTry to improve the read-regexp doc string
Lars Ingebrigtsen [Wed, 27 Jan 2021 02:38:49 +0000 (03:38 +0100)]
Try to improve the read-regexp doc string

* lisp/replace.el (read-regexp): Attempt to clarify the semantics
(bug#46088).

(cherry picked from commit eded2a7ad7d456a417354a2797c18e9a578414d7)

3 years agoImprove documentation of 'read-regexp' and friends
Eli Zaretskii [Wed, 27 Jan 2021 15:15:46 +0000 (17:15 +0200)]
Improve documentation of 'read-regexp' and friends

* doc/emacs/glossary.texi (Glossary): Add "Tag" to the Glossary.
* doc/emacs/maintaining.texi (Xref): Mention that identifiers are
also known as "tags".

* lisp/replace.el (read-regexp, read-regexp-suggestions): Improve
wording of doc strings.  (Bug#46088)  (Bug#46089)

3 years ago* lisp/subr.el (empty-history): Move defvar to functions where it's used.
Juri Linkov [Wed, 27 Jan 2021 09:42:30 +0000 (11:42 +0200)]
* lisp/subr.el (empty-history): Move defvar to functions where it's used.

3 years agoSupport variable name for previous-window in display-buffer-in-previous-window
Juri Linkov [Mon, 25 Jan 2021 20:10:15 +0000 (22:10 +0200)]
Support variable name for previous-window in display-buffer-in-previous-window

* lisp/window.el (display-buffer-in-previous-window): Support the value of
'previous-window' entry as a symbol for variable name (bug#45688).

3 years agoFix indentation in sieve-mode
Lars Ingebrigtsen [Wed, 27 Jan 2021 06:04:08 +0000 (07:04 +0100)]
Fix indentation in sieve-mode

* lisp/net/sieve-mode.el (sieve-mode-indent-function): New function.
(sieve-mode): Don't inherit from C mode, because the syntax
doesn't really resemble C mode that much (except being curly braced).

3 years agoFix setting of line/point style in calc gnuplot
Lars Ingebrigtsen [Wed, 27 Jan 2021 03:27:42 +0000 (04:27 +0100)]
Fix setting of line/point style in calc gnuplot

* lisp/calc/calc-graph.el (calc-graph-set-styles): Modern gnuplot
requires "ls" before the line style and "ps" before the point
style (bug#46070).

3 years agoread-regexp-suggestions doc string improvement
Lars Ingebrigtsen [Wed, 27 Jan 2021 02:47:02 +0000 (03:47 +0100)]
read-regexp-suggestions doc string improvement

* lisp/replace.el (read-regexp-suggestions): Add a link to the
manual to explain what a tag is (bug#46089).

3 years agoTry to improve the read-regexp doc string
Lars Ingebrigtsen [Wed, 27 Jan 2021 02:38:49 +0000 (03:38 +0100)]
Try to improve the read-regexp doc string

* lisp/replace.el (read-regexp): Attempt to clarify the semantics
(bug#46088).

3 years agoUse lexical-binding in all of `lisp/url`
Stefan Monnier [Tue, 26 Jan 2021 23:17:00 +0000 (18:17 -0500)]
Use lexical-binding in all of `lisp/url`

* lisp/url/url-dav.el: Use lexical-binding.
(url-dav-process-DAV:prop): Remove unused var `handler-func`.
(url-dav-lock-resource): Remove unused var `child-url`.
(url-dav-active-locks): Remove unused var `properties`.
(url-dav-delete-directory): Remove unused var `props`.
(url-dav-file-name-completion): Remove unused var `result`.

* lisp/url/url-expand.el (url-expand-file-name): Use \s

* lisp/url/url-file.el (url-file): Improve regexp.

* lisp/url/url-gw.el: Use lexical-binding.
(url-open-stream): Remove unused var `cur-retries`, `retry`, `errobj`.

* lisp/url/url-imap.el: Use lexical-binding.
(imap-username, imap-password): Declare.

* lisp/url/url-mailto.el: Use lexical-binding.
(url-mailto): Remove unused var `func`.  Use `push`.

* lisp/url/url-news.el: Use lexical-binding.
(url-news): Remove unused var `article-brackets`.

* lisp/url/url-cid.el:
* lisp/url/url-cache.el:
* lisp/url/url-about.el:
* lisp/url/url-tramp.el:
* lisp/url/url-proxy.el:
* lisp/url/url-privacy.el:
* lisp/url/url-nfs.el:
* lisp/url/url-ldap.el:
* lisp/url/url-misc.el:
* lisp/url/url-methods.el: Use lexical-binding.

3 years ago* lisp/progmodes/sh-script.el (sh-smie-sh-rules): Tweak indent of new `for`
Stefan Monnier [Tue, 26 Jan 2021 22:57:26 +0000 (17:57 -0500)]
* lisp/progmodes/sh-script.el (sh-smie-sh-rules): Tweak indent of new `for`

The new `for (TEST) { BODY }` syntax introduces various challenges.
This patch just fixes a trivial subcase.

3 years agoRevert "Allow gnus-retrieve-headers to return headers directly"
Eric Abrahamsen [Tue, 26 Jan 2021 16:47:07 +0000 (08:47 -0800)]
Revert "Allow gnus-retrieve-headers to return headers directly"

This reverts commit 20add1cd22f9775a4475148b300cf2a4de4bd54a. This
needs more work before it's ready to merge.

3 years agoFix typos and punctuation
Eli Zaretskii [Tue, 26 Jan 2021 16:24:53 +0000 (18:24 +0200)]
Fix typos and punctuation

* src/w32fns.c:
* src/frame.h:
* doc/lispref/frames.texi (Frame Layout):
* etc/NEWS: Fix typos and punctuation in recent changes.

3 years agoFix typo in last change of FRAME_INTERNAL_BORDER_WIDTH
Martin Rudalics [Tue, 26 Jan 2021 09:59:59 +0000 (10:59 +0100)]
Fix typo in last change of FRAME_INTERNAL_BORDER_WIDTH

* src/frame.h (FRAME_INTERNAL_BORDER_WIDTH): Fix typo in last
change.

3 years agoAdd distinct controls for child frames' borders (Bug#45620)
Alexander Miller [Tue, 26 Jan 2021 09:36:52 +0000 (10:36 +0100)]
Add distinct controls for child frames' borders (Bug#45620)

The background of the 'child-frame-border' face instead of the
'internal-border' face now controls the color of child frames'
borders.

The 'child-frame-border-width' frame parameter is now used for the
width of child frames' borders instead of internal-border-width',
though we still fall back on using the latter if the former is not
set.

* doc/lispref/frames.texi (Frame Layout): Mention
'child-frame-border' and 'child-frame-border-width'.
(Layout Parameters): Mention 'child-frame-border-width'.
* etc/NEWS: Mention new face 'child-frame-border' and frame
parameter 'child-frame-border-width'.
* lisp/faces.el (child-frame-border): New face.
* src/dispextern.h (enum face_id): Add CHILD_FRAME_BORDER_FACE_ID.
* src/frame.c (Fframe_child_frame_border_width): New function.
(gui_report_frame_params): Add entry for Qchild_frame_border_width.
* src/frame.h (struct frame): New slot child_frame_border_width.
(FRAME_CHILD_FRAME_BORDER_WIDTH): New inlined function.
* src/nsfns.m (ns_set_child_frame_border_width): New function.
(Fx_create_frame): Handle Qchild_frame_border_width parameter.
(ns_frame_parm_handlers): Add ns_set_child_frame_border_width.
* src/nsterm.m (ns_clear_under_internal_border): Handle
CHILD_FRAME_BORDER_FACE_ID.
* src/w32fns.c (w32_clear_under_internal_border): Handle
CHILD_FRAME_BORDER_FACE_ID.
(w32_set_internal_border_width): New function.
(Fx_create_frame): Handle Qchild_frame_border_width parameter.
(w32_frame_parm_handlers): Add w32_set_child_frame_border_width.
* src/xfaces.c (lookup_basic_face, realize_basic_faces): Handle
CHILD_FRAME_BORDER_FACE_ID.
* src/xfns.c (x_set_child_frame_border_width): New function.
(Fx_create_frame): Handle Qchild_frame_border_width parameter.
(x_frame_parm_handlers): Add x_set_child_frame_border_width.
* src/xterm.c (x_clear_under_internal_border)
(x_after_update_window_line): Handle CHILD_FRAME_BORDER_FACE_ID.

3 years agoUse `lexical-binding` in all `lisp/international` files
Stefan Monnier [Tue, 26 Jan 2021 03:58:19 +0000 (22:58 -0500)]
Use `lexical-binding` in all `lisp/international` files

* lisp/startup.el (keyboard-type): Make obsolete and lex-bound.

* admin/unidata/unidata-gen.el (unidata-gen-file)
(unidata-gen-charprop): Mark the generated files to use lexical binding.

* lisp/international/isearch-x.el: Use lexical-binding.
(junk-hist): Declare locally.

* lisp/international/iso-cvt.el:
* lisp/international/utf-7.el:
* lisp/international/robin.el:
* lisp/international/ogonek.el:
* lisp/international/latin1-disp.el:
* lisp/international/kkc.el:
* lisp/international/kinsoku.el:
* lisp/international/ja-dic-utl.el: Use lexical-binding.

* lisp/international/ja-dic-cnv.el: Use lexical-binding.
(skkdic-breakup-string): Remove unused var `kana-len`.

* lisp/international/latexenc.el: Use lexical-binding.
(tex-start-of-header): Declare.

* lisp/international/mule-diag.el: Use lexical-binding.
(list-character-sets): Remove unused var `pos`.
(list-character-sets-1): Remove unused vars `tail` and `charset`.
(list-charset-chars): Remove unused vars `chars` and `plane`.
(describe-coding-system): Remove unused var `extra-spec`.
(mule--print-opened): New var.
(print-fontset): Bind it.
(print-fontset-element): Use it instead of `print-opened`.

* lisp/international/quail.el: Use lexical-binding.
(quail-start-translation, quail-start-conversion):
Remove unused var `generated-events`.
(quail-help-insert-keymap-description): Use local dynbound var `the-keymap`.

3 years agoMake subdirs . nil in dir-locals in ~/ work
Lars Ingebrigtsen [Tue, 26 Jan 2021 00:12:45 +0000 (01:12 +0100)]
Make subdirs . nil in dir-locals in ~/ work

* lisp/files.el (dir-locals-collect-variables): Compare directory
names after expanding.  This makes a (subdirs . nil) in ~/ work as
expected (bug#17205).

Test case:

((nil . ((a .  "hallo")
         (subdirs . nil))))

in ~/

3 years agoDon't move point to the prompt in previous-line-or-history-element (bug#46033)
Juri Linkov [Mon, 25 Jan 2021 17:14:22 +0000 (19:14 +0200)]
Don't move point to the prompt in previous-line-or-history-element (bug#46033)

* lisp/simple.el (previous-line-or-history-element):
Avoid moving point to the prompt.

3 years agoFontify special forms and macros the same
Lars Ingebrigtsen [Mon, 25 Jan 2021 06:44:29 +0000 (07:44 +0100)]
Fontify special forms and macros the same

* lisp/emacs-lisp/lisp-mode.el (lisp--el-match-keyword): Handle
special forms and macros the same way (bug#43265).  This makes
things like (setq a '(if a b)) be fontified correctly (i.e., not
fontified as a keyword).

3 years agoRewrite lisp--el-funcall-position-p to be inverse of the -not function
Lars Ingebrigtsen [Sun, 24 Jan 2021 22:25:52 +0000 (23:25 +0100)]
Rewrite lisp--el-funcall-position-p to be inverse of the -not function

* lisp/emacs-lisp/lisp-mode.el (lisp--el-funcall-position-p):
Rename and rewrite to return the inverse value.  Non-inverted
predicate functions are easier to reason about.
(lisp--el-non-funcall-position-p): Make obsolete.

3 years agoFix macro fontification in `condition-case' handler bodies
Lars Ingebrigtsen [Sun, 24 Jan 2021 20:43:25 +0000 (21:43 +0100)]
Fix macro fontification in `condition-case' handler bodies

* lisp/emacs-lisp/lisp-mode.el (lisp--el-non-funcall-position-p):
Fontify macros in the BODY of HANDLERS in `condition-case'
correctly (bug#43265).

3 years agoTweak `condition-case' keyword highlights
Lars Ingebrigtsen [Sun, 24 Jan 2021 20:31:09 +0000 (21:31 +0100)]
Tweak `condition-case' keyword highlights

* lisp/emacs-lisp/lisp-mode.el (lisp--el-non-funcall-position-p):
Tweak `condition-case' position check to skip the VAR form.

3 years agoAdd some elisp-mode font lock tests
Lars Ingebrigtsen [Sun, 24 Jan 2021 19:53:36 +0000 (20:53 +0100)]
Add some elisp-mode font lock tests

3 years agoMake Tramp's insert-directory more robust
Michael Albinus [Sun, 24 Jan 2021 18:26:02 +0000 (19:26 +0100)]
Make Tramp's insert-directory more robust

* lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory):
Use `tramp-sh--quoting-style-options'.

* test/lisp/net/tramp-tests.el (tramp--test-hpux-p, tramp--test-ksh-p):
Remove superfluous nil.
(tramp--test-sh-no-ls--dired-p): New defun.
(tramp--test-special-characters): Use it.

3 years agoFix insertion logic of newly subscribed Gnus groups
Eric Abrahamsen [Sun, 24 Jan 2021 18:09:05 +0000 (10:09 -0800)]
Fix insertion logic of newly subscribed Gnus groups

* lisp/gnus/gnus-start.el (gnus-subscribe-newsgroup): This was a
misunderstanding of the next/previous argument: no group should ever
be inserted before "dummy.group".
(gnus-group-change-level): Make it clearer that PREVIOUS can be
nil. In fact none of this code would error on a nil value, but it
_looks_ like nil is unexpected.

3 years agoAdd more assertions to recently-added process test.
Philipp Stephani [Sun, 24 Jan 2021 12:56:18 +0000 (13:56 +0100)]
Add more assertions to recently-added process test.

* test/src/process-tests.el (process-tests/multiple-threads-waiting):
Also check that 'thread-join' and 'thread-last-error' return the
expected errors.

3 years ago; xref-revert-buffer: Drop the (goto-char) at the end
Dmitry Gutov [Sat, 23 Jan 2021 00:58:53 +0000 (02:58 +0200)]
; xref-revert-buffer: Drop the (goto-char) at the end

(cherry picked from commit cc98d0bf5225c281f91152aa838c4cb093df52e9)

3 years agoErase the buffer only after fetching the new contents
Dmitry Gutov [Sat, 23 Jan 2021 00:53:12 +0000 (02:53 +0200)]
Erase the buffer only after fetching the new contents

* lisp/progmodes/xref.el (xref-revert-buffer):
Erase the buffer only after fetching the new contents (bug#46042).

(cherry picked from commit 5821dee0949b2913c07970d6e4b8bb8e8a35f036)

3 years agoFix recently uncovered 'make check' failures
Basil L. Contovounesios [Sat, 23 Jan 2021 23:31:13 +0000 (23:31 +0000)]
Fix recently uncovered 'make check' failures

For discussion, see the following thread:
https://lists.gnu.org/r/emacs-devel/2021-01/msg01111.html

* test/lisp/autorevert-tests.el
(auto-revert-test07-auto-revert-several-buffers):
* test/lisp/emacs-lisp/seq-tests.el (test-seq-do-indexed)
(test-seq-random-elt-take-all): Fix errors from using add-to-list on
lexical variables.
* test/lisp/emacs-lisp/cl-lib-tests.el
(cl-lib-defstruct-record): Expect test to succeed when byte-compiled
following change of 2021-01-23 'Fix missing file&line info in
"Unknown defun property" warnings'.
(cl-lib-tests--dummy-function): Remove; no longer needed.
(old-struct): Silence byte-compiler warning about unused lexical
variable.

3 years agoAdd support for dired compressing .lz/.lzo files
Jean Louis [Sat, 23 Jan 2021 23:34:44 +0000 (00:34 +0100)]
Add support for dired compressing .lz/.lzo files

* lisp/dired-aux.el (dired-compress-files-alist): Add support for
.lz/.lzo files (bug#44901).

3 years agoProperly initialize gnus-search-namazu-index-directory
Eric Abrahamsen [Sat, 23 Jan 2021 22:24:09 +0000 (14:24 -0800)]
Properly initialize gnus-search-namazu-index-directory

* lisp/gnus/gnus-search.el (gnus-search-namazu): We were missing the
appropriate :initform on this slot definition (Bug#46047).

3 years agoMake (subdirs . nil) in .dir-locals.el work
Lars Ingebrigtsen [Sat, 23 Jan 2021 22:12:05 +0000 (23:12 +0100)]
Make (subdirs . nil) in .dir-locals.el work

* lisp/files.el (dir-locals-collect-variables): Don't
destructively modify the cached structure (bug#17205), because
that means that (subdirs . nil) doesn't work.