1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-20 11:33:09 -08:00
Commit graph

145028 commits

Author SHA1 Message Date
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
Lars Ingebrigtsen
9d50d7a0c6 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).
2021-01-27 07:04:08 +01:00
Lars Ingebrigtsen
883c15fb32 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).
2021-01-27 04:27:42 +01:00
Lars Ingebrigtsen
f9cc2d4824 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).
2021-01-27 03:47:02 +01:00
Lars Ingebrigtsen
eded2a7ad7 Try to improve the read-regexp doc string
* lisp/replace.el (read-regexp): Attempt to clarify the semantics
(bug#46088).
2021-01-27 03:38:49 +01:00
Stefan Monnier
b870e584a4 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.
2021-01-26 18:17:00 -05:00
Stefan Monnier
a572b21928 * 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.
2021-01-26 17:58:42 -05:00
Eric Abrahamsen
046db04e3d Revert "Allow gnus-retrieve-headers to return headers directly"
This reverts commit 20add1cd22. This
needs more work before it's ready to merge.
2021-01-26 08:47:07 -08:00
Eli Zaretskii
3131a98911 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.
2021-01-26 18:24:53 +02:00
Martin Rudalics
3c314f3dd2 Fix typo in last change of FRAME_INTERNAL_BORDER_WIDTH
* src/frame.h (FRAME_INTERNAL_BORDER_WIDTH): Fix typo in last
change.
2021-01-26 10:59:59 +01:00
Alexander Miller
ff7b1a133b 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.
2021-01-26 10:36:52 +01:00
Stefan Monnier
b4b6a26840 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`.
2021-01-25 22:58:19 -05:00