Commit graph

145039 commits

Author SHA1 Message Date
Stefan Kangas
ae7fe263b2 ; 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.
2021-01-28 21:57:51 +01:00
Stefan Kangas
554ec932ba 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.
2021-01-28 21:35:34 +01:00
Stefan Kangas
11c504c9d2 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.
2021-01-28 21:34:31 +01:00
Juri Linkov
c8c4d65d65 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.
2021-01-28 21:27:26 +02:00
Stefan Kangas
50c7de093a * lisp/wdired.el: Minor doc fixes. 2021-01-28 19:36:24 +01:00
Stefan Kangas
a8caa66906 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
2021-01-28 19:36:12 +01:00
Stefan Kangas
aca93f6723 * lisp/leim/quail/viqr.el: Use lexical-binding. 2021-01-28 18:49:29 +01:00
Stefan Kangas
f782f1a8e0 * lisp/leim/quail/compose.el: Use lexical-binding. 2021-01-28 18:49:17 +01:00
Stefan Kangas
c407b54cf3 * lisp/ezimage.el: Use lexical-binding. 2021-01-28 18:43:15 +01:00
Stefan Monnier
592a230832 * 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.
2021-01-28 12:27:27 -05:00
Stefan Kangas
b04f1c0cec Add cross-reference to with-eval-after-load
* lisp/subr.el (eval-after-load): Doc fix; add cross-reference to
'with-eval-after-load'.
2021-01-28 18:24:45 +01:00
Stefan Kangas
4cded88b0e * lisp/generic-x.el (hosts-generic-mode): Support IPv6 addresses. 2021-01-28 18:24:45 +01:00
Stefan Kangas
80d964ec8b Add missing file systems to etc-fstab-generic-mode
* lisp/generic-x.el (etc-fstab-generic-mode): Add entries for missing
file systems.
2021-01-28 18:24:45 +01:00
Stefan Kangas
6c601689a4 ; * lisp/dired-aux.el (dired-compress-files-alist): Minor doc fix. 2021-01-28 18:24:45 +01:00
Stefan Monnier
91f9d6788e * 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".
2021-01-28 12:13:43 -05:00
Michael Albinus
ac102bb966 * lisp/net/ange-ftp.el (ange-ftp-ls): Handle several "--dired" switches. 2021-01-28 15:09:29 +01:00
Michael Albinus
a8c4f8041c 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)
2021-01-28 15:09:18 +01:00
Stefan Monnier
62233c9824 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.
2021-01-28 08:43:15 -05:00
Lars Ingebrigtsen
0120f45db6 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.
2021-01-28 13:10:45 +01:00
Lars Ingebrigtsen
64d4648869 Fix numerical `comment-padding' value
* lisp/newcomment.el (comment-padright): Allow using a number for
`comment-padding', like the doc string says (bug#40056).
2021-01-28 09:57:48 +01:00
Lars Ingebrigtsen
8992f8abf3 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).
2021-01-28 08:40:15 +01:00
Mattias M
e7e7ef1588 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
2021-01-28 07:34:10 +01:00
Lars Ingebrigtsen
0870ebb3cb 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.
2021-01-28 07:09:18 +01:00
Lars Ingebrigtsen
e4c6670790 Fix Gnus icalendar button navigation
* lisp/gnus/gnus-icalendar.el (gnus-icalendar-insert-button): Mark
buttons correctly for TAB navigation (bug#46135).
2021-01-28 06:21:40 +01:00
Harald Jörg
9b01bc5682 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.)
2021-01-28 04:22:21 +01:00
João Távora
2a71831eb3 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.
2021-01-28 04:18:12 +01:00
Stefan Monnier
30914167fd * lisp/emacs-lisp/macroexp.el (macroexp-if): Fix typo 2021-01-27 18:53:58 -05:00
Stefan Monnier
d93bca0197 * 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))
2021-01-27 18:51:09 -05:00
Stefan Monnier
d168110a32 * 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.
2021-01-27 18:47:28 -05:00
Juri Linkov
9f25ca5107 * 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).
2021-01-27 20:33:13 +02:00
Paul Eggert
f5d30d9d8b * admin/notes/unicode: titdic-cnv.el is now utf-8. 2021-01-27 10:10:44 -08:00
Juri Linkov
85f8b57500 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.
2021-01-27 20:08:43 +02:00
Stefan Monnier
2d8daac122 * 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.
2021-01-27 12:35:19 -05:00
Stefan Monnier
89327ce68d * 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.
2021-01-27 12:25:52 -05:00
Stefan Monnier
b0e96e554c 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.
2021-01-27 11:13:39 -05:00
Glenn Morris
7c257e2286 ; 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
2021-01-27 07:55:11 -08:00
Glenn Morris
4be6c9215b Merge from origin/emacs-27
3443a1c698 Fix last change
2021-01-27 07:55:11 -08:00
Glenn Morris
27889f029a ; Merge from origin/emacs-27
The following commit was skipped:

c8fa056a50 Mention undo-amalgamate-change-group in the lispref manual
2021-01-27 07:55:11 -08:00
Glenn Morris
0ca75f1956 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
2021-01-27 07:55:11 -08:00
Glenn Morris
5597398462 ; Merge from origin/emacs-27
The following commit was skipped:

82c228a017 Don't let `maybe_quit` prevent resetting `consing_until_gc...
2021-01-27 07:55:11 -08:00
Glenn Morris
588d2306ac Merge from origin/emacs-27
b58fd1eab9 ; * lisp/language/cham.el: Fix copy-paste mistake in comment.
2021-01-27 07:55:11 -08:00
Eli Zaretskii
ff03411269 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>.
2021-01-27 17:52:51 +02:00
Michael Albinus
12095de8b9 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.
2021-01-27 16:30:49 +01:00
Michael Albinus
45112398cd * lisp/net/dbus.el (dbus-monitor-handler): Disable buffer undo. 2021-01-27 16:30:08 +01:00
Eli Zaretskii
e79e377a4e 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 49eb03d6c8)
2021-01-27 17:19:16 +02:00
Lars Ingebrigtsen
0340e9eccb 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 f9cc2d4824)
2021-01-27 17:18:55 +02:00
Lars Ingebrigtsen
932aba674c Try to improve the read-regexp doc string
* lisp/replace.el (read-regexp): Attempt to clarify the semantics
(bug#46088).

(cherry picked from commit eded2a7ad7)
2021-01-27 17:18:33 +02:00
Eli Zaretskii
49eb03d6c8 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)
2021-01-27 17:15:46 +02:00
Juri Linkov
08574a7f40 * lisp/subr.el (empty-history): Move defvar to functions where it's used. 2021-01-27 11:42:30 +02:00
Juri Linkov
fb05199b0b 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).
2021-01-27 11:31:04 +02:00