1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-25 06:50:46 -08:00
Commit graph

84287 commits

Author SHA1 Message Date
Po Lu
a34afbf2ae Restore old hl-line code
* lisp/hl-line.el: Restore old code to remove obsoletions.
(hl-line-overlay-priority): Make defcustom.
2022-03-23 16:48:49 +08:00
Po Lu
8aff4c0a36 Handle quitting correctly during interprogram drag-and-drop
* lisp/mouse.el (mouse-drag-and-drop-region): Handle quit
correctly by exiting the cross program drag and drop.
2022-03-23 11:30:13 +08:00
Andrew G Cohen
eb25ae3f2d Refactor gnus/nnselect artlist saving and getting
* lisp/gnus/nnselect.el (nnselect-generate-run): New function that
replaces nnselect-run.
(nnselect-store-artlist): New function.
(nnselect-get-artlist): Update function.
(nnselect-request-group, nnselect-request-thread)
(nnselect-request-create-group, nnselect-request-group-scan): Use the
new functions.
* doc/misc/gnus.texi (Selection Groups): Document artlist storage and
retrieval.
2022-03-23 08:13:28 +08:00
Alexander Adolf
8dc85d1db4 Enable Better Alignment of EUDC Inline Expansion With RFC5322
The format of EUDC inline expansion results is formatted according to
the variable eudc-inline-expansion-format, which previously defaulted
to '("%s %s <%s>" firstname name email).

Since email address specifications need to comply with RFC 5322 in
order to be useful in messages, there was little headroom for users to
change this format anyway. Plus, if an EUDC back-end returned an empty
first and last name, the result was the email address in angle
brackets. Whilst this was standard with RFC 822, it is marked as
obsolete syntax by its successor RFC 5322. Also, the first and last
name part was never enclosed in double quotes, potentially producing
invalid address specifications, which may be rejected by a receiving
MTA.

This commit updates the variable eudc-inline-expansion-format, so that
it can, in addition to the current ("format" attributes) list, now
alternatively be set to nil, or a formatting function. In both cases
the resulting email address is formatted using the new function
eudc-rfc5322-make-address, whose results fully comply with RFC 5322.

If the value is nil (the new default value), eudc-rfc5322-make-address
will be called to produce any of the default formats

                               ADDRESS
                           FIRST <ADDRESS>
                            LAST <ADDRESS>
                         FIRST LAST <ADDRESS>

depending on whether a first and/or last name are returned by the
query, or not.

If the value is a formatting function, that will be called to allow
the user to supply content for the phrase and comment parts of the
address (cf. RFC 5322). Thus one can produce any of the formats:

                               ADDRESS
                           PHRASE <ADDRESS>
                          ADDRESS (COMMENT)
                      PHRASE <ADDRESS> (COMMENT)

This can for example be used to get "last, first <address>" instead of
the default "first last <address>".

In any case when using nil, or the formatting function, the phrase
part of the result will be enclosed in double quotes if needed, and
the comment part will be omitted if it contains characters not allowed
by RFC 5322.

When eudc-inline-expansion-format remains set to a list as previously,
the old behaviour is fully retained.
2022-03-22 18:15:47 -04:00
Lars Ingebrigtsen
c8bde5b0a3 Fix two no-X compilation warnings
* lisp/mouse.el (x-hide-tip, x-show-tip): Declare to avoid no-X
build compilation warnings (bug#54524).

* lisp/term/pgtk-win.el (window-system-initialization): Avoid no-X
compilation warning.
2022-03-22 21:14:21 +01:00
Lars Ingebrigtsen
5334e726d0 Make mail-header-parse-addresses-lax more lax
* lisp/mail/mail-parse.el (mail-header-parse-addresses-lax): Be
more resilient (bug#54523).
2022-03-22 20:13:31 +01:00
Lars Ingebrigtsen
d0e457325d Add a shell-filter-ring-bell function
* lisp/shell.el (shell-mode): Mention it.
(shell-filter-ring-bell): New function (bug#21652).
2022-03-22 19:16:09 +01:00
Eli Zaretskii
f2047fdca4 Fix documentation of the new completion-related features
* etc/NEWS:
* lisp/minibuffer.el (completion-auto-help):
* doc/lispref/text.texi (Special Properties):
* doc/emacs/mini.texi (Completion Options): Fix wording of
recently added documentation and customization options.
2022-03-22 19:56:06 +02:00
Jimmy Aguilar Mena
da3af500ad Revert "Set cursor-face-highlight-nonselected-window in completions."
This reverts commit 1641b5c04c.

This fixes incorrect highlight in Completions.
2022-03-22 18:31:13 +01:00
Allen Li
142478c095 Add user option for controlling dired-do-shell-command prompt
* doc/emacs/dired.texi (Shell Commands in Dired): Document option
* lisp/dired-aux.el (dired-confirm-shell-command): Add option
(dired-do-shell-command): Check option before prompting
(bug#29465).
2022-03-22 17:48:13 +01:00
Lars Ingebrigtsen
1327593ce2 Make eshell link faces more distinctive on 8-color displays
* lisp/eshell/em-ls.el (eshell-ls-directory):
(eshell-ls-symlink): Make the faces be distinctive on 8-colour
displays (bug#43615).
2022-03-22 16:33:43 +01:00
dickmao
3054e70d76 Restore hl-line--buffer tracking
* lisp/hl-line.el (hl-line-overlay, hl-line-overlay-buffer):
Correct replacement variable.
(hl-line--overlay): Clearer doc.
(hl-line--buffer): Nee hl-line-overlay-buffer
(hl-line-sticky-flag): Custom initialization is unfathomable.
(hl-line-mode, hl-line-unhighlight): Orthogonalize sticky.
(hl-line-highlight): Remove highlight from previous buffer.
* test/lisp/hl-line-tests.el (hl-line-sticky, hl-line-tests-verify):
(hl-line-tests-sticky-across-frames, hl-line-tests-sticky):
Test (bug#54481).
2022-03-22 15:59:11 +01:00
Lars Ingebrigtsen
9b47ccd72e Revert "Fix dependency problem in hl-line-sticky-flag"
This reverts commit 46daf70c4a.

This is fixed differently in a subsequent patch.
2022-03-22 15:56:14 +01:00
Lars Ingebrigtsen
46daf70c4a Fix dependency problem in hl-line-sticky-flag
* lisp/hl-line.el (hl-line-sticky-flag): Open-code
hl-line-unhighlight to avoid recursive dependencies (bug#54481).
2022-03-22 15:35:05 +01:00
Lars Ingebrigtsen
656c2dd66e Fix color-lighten-hsl logic
* lisp/color.el (color-lighten-hsl): Lighten by percentage,
instead of just adding the specified number to the luminance
element (bug#54514).
2022-03-22 15:28:02 +01:00
Lars Ingebrigtsen
fa55708b55 Add new function image-supported-file-p
* lisp/image.el (image-type-from-file-name): Make obsolete.
(image-supported-file-p): New function that has a more sensible
value.
(image-type): Adjust caller.

* lisp/thumbs.el (thumbs-file-size, thumbs-show-image-num): Adjust
callers.

* lisp/mail/rmailmm.el (rmail-mime-set-bulk-data): Adjust caller
and logic.
2022-03-22 15:02:08 +01:00
Lars Ingebrigtsen
c9c3d5d830 Revert "Allow using image-convert to view .bmp images"
This reverts commit ede8ad507d.

This leads to failures for usages of the function where
Emacs doesn't have support for the formats.
2022-03-22 14:45:19 +01:00
Michael Albinus
0094dde11d Fix grep-like functions when running on a remote host
* doc/lispref/processes.texi (Shell Arguments):
* etc/NEWS: Describe change in 'shell-quote-argument'.  Fix typos.

* lisp/subr.el (shell-quote-argument): New optional argument POSIX.

* lisp/progmodes/grep.el (grep-compute-defaults)
(grep-default-command, grep-expand-keywords, lgrep)
(rgrep-default-command): Use POSIX argument in
`shell-quote-argument'.  (Bug#54487)
2022-03-22 10:29:16 +01:00
Juri Linkov
15ac51e0fd Merge branch 'feature/completions-customs' 2022-03-22 10:22:46 +02:00
Po Lu
63a33c3057 Fix unloading the hl-line library
* lisp/hl-line.el (hl-line-unload-function): Restore function.
2022-03-22 08:22:41 +08:00
Po Lu
f36d929ee7 Fix incompatible changes in hl-line
* lisp/hl-line.el (hl-line-face): Rename back to hl-line.
(hl-line-face): Restore defcustom.
2022-03-22 08:19:32 +08:00
Juri Linkov
eba9c473a8 Small fixes for new completions features
* lisp/minibuffer.el (completions-header-format):
Rename from completion-header-format.
(completions-highlight, completions-highlight-face):
Move up before first use.
2022-03-21 21:27:41 +02:00
Lars Ingebrigtsen
a5e8da4fa2 Add new user option `diff-entire-buffers'
* lisp/vc/diff.el (diff-entire-buffers): New user option (bug#54060).
(diff-file-local-copy): Use it.
(diff-buffers): Mention it in the doc string.
2022-03-21 19:28:14 +01:00
Lars Ingebrigtsen
fd5fe11211 Don't break autoload generation of `left-margin' isn't zero
* lisp/emacs-lisp/autoload.el (make-directory-autoloads): Fix
autoload generation breakage is left-margin isn't zero (bug#54491).
2022-03-21 19:15:55 +01:00
Lars Ingebrigtsen
d74cd0cf1f Make `n' in image-mode work more reliably with external formats
* lisp/image-mode.el (image-mode): Init the external machinery so
that commands like `n' work for those files.
* lisp/image/image-converter.el (image-converter-initialize):
Factored out into own function.
(image-convert-p): Use it.
(image-convert): Ditto.
2022-03-21 18:05:18 +01:00
Lars Ingebrigtsen
61d34c6a50 Allow specifying the intermediate format
* lisp/image/image-converter.el (image-convert-to-format): New
user format (bug#54494).
(image-convert, image-converter--convert-magick)
(image-converter--convert): Use it.
2022-03-21 17:51:21 +01:00
Lars Ingebrigtsen
ede8ad507d Allow using image-convert to view .bmp images
* lisp/image.el (image-type-from-file-name): Allow Emacs to fall
back on image-convert to display .bmp images (bug#54492).
2022-03-21 17:19:03 +01:00
Lars Ingebrigtsen
20c4eca343 Regenerated ldefs-boot.el 2022-03-21 16:14:40 +01:00
dickmao
0a094fb65c Rewrite hl-line-mode
The fashion of dual global and minor modes, each managing a replica of
state, has long been outmoded by globalized minor modes (nee
easy-mmode-define-global-mode) around the turn of the century.

* lisp/calendar/todo-mode.el (todo-toggle-item-highlighting,
todo-hl-line-range, todo-modes-set-2): Adapt to new
hl-line-highlight-hook.
* lisp/hl-line.el (hl-line-overlay): Rename hl-line--overlay.
(global-hl-line-overlay, global-hl-line-overlays,
global-hl-line-sticky-flag, hl-line-overlay-buffer,
hl-line-range-function): Obsolesce.
(hl-line--overlay): Erstwhile hl-line-overlay.
(hl-line, hl-line-face): Consolidate.
(hl-line-sticky-flag): Say less (Gen Z Hospital).
(hl-line-overlay-priority): Make this a custom.
(hl-line-highlight-hook): Prefer hook over specialized
hl-line-range-function.
(hl-line-mode): Say less (Gen Z Hospital).
(hl-line-make-overlay): Remove
(hl-line-highlight, hl-line-unhighlight): Rewrite.
(hl-line-maybe-unhighlight): Remove.
(hl-line-turn-on): Necessary for globalized minor mode.
(global-hl-line-mode, global-hl-line-highlight,
global-hl-line-highlight-all, global-hl-line-unhighlight,
global-hl-line-maybe-unhighlight, global-hl-line-unhighlight-all):
Prefer globalized minor mode.
(hl-line-move, hl-line-unload-function): Remove.
* test/lisp/calendar/todo-mode-tests.el (todo-test-item-highlighting,
todo-test-done-items-separator06-bol,
todo-test-done-items-separator06-eol,
todo-test-done-items-separator07): Adapt to consolidated face.
2022-03-21 16:07:18 +01:00
Lars Ingebrigtsen
bd5d136777 Add a new face shr-code
* lisp/net/shr.el (shr-code): New face (bug#54480).
(shr-tag-code): Use it.
2022-03-21 16:01:33 +01:00
Jimmy Aguilar Mena
1641b5c04c Set cursor-face-highlight-nonselected-window in completions.
* lisp/simple.el (completion-setup-function) : Sets
cursor-face-highlight-nonselected-window to t in Completions.
2022-03-21 07:55:03 +01:00
Stefan Kangas
7cee796556 Merge from origin/emacs-28
f15922a57c Update to Org 9.5.2-25-gaf6f12
9fcdd5b63f Improve doc strings of read-char-from-minibuffer-insert-* ...
2022-03-21 06:30:40 +01:00
Kyle Meyer
f15922a57c Update to Org 9.5.2-25-gaf6f12 2022-03-20 21:31:32 -04:00
Dmitry Gutov
f0e8f4a4ca Support indentation of Ruby pattern matching expressions
* lisp/progmodes/ruby-mode.el (ruby-smie-grammar, ruby-smie-rules)
(ruby-block-mid-keywords): Treat 'in' token similarly to 'when'.

* test/lisp/progmodes/ruby-mode-resources/ruby.rb:
Add indentation example.
2022-03-21 03:20:36 +02:00
Andrew G Cohen
01336a2582 Fix imap fetching multiple mailboxes (bug#54158)
* lisp/gnus/mail-source.el (mail-source-fetch-imap): Variables
mailbox-source-string and remove should be reset for each mailbox.
2022-03-21 07:56:34 +08:00
Augusto Stoffel
ceb57e10d6 Add lazy highlight to 'isearch-edit-string'
* lisp/isearch.el (isearch-edit-string): Activate lazy highlight and
lazy count, provided 'isearch-lazy-highlight' respectively
'isearch-lazy-count' are non-nil.
2022-03-20 22:25:35 +02:00
Augusto Stoffel
0f7c3f553f Allow lazy highlight and match count while reading from minibuffer
* lisp/isearch.el (minibuffer-lazy-highlight-setup): New function, can
be added to 'minibuffer-setup-hook' to enable lazy highlight and count
while reading from minibuffer.
(minibuffer-lazy-count-format, minibuffer-lazy-highlight-transform,
minibuffer-lazy-highlight--overlay, minibuffer-lazy-highlight--count,
minibuffer-lazy-highlight--after-change,
minibuffer-lazy-highlight--exit): Auxiliary variables and functions
implementing the lazy highlight functionality while reading from
minibuffer.
2022-03-20 22:25:28 +02:00
Augusto Stoffel
3d204afe3c New hook, lazy-count-update-hook
* lisp/isearch.el (lazy-count-update-hook): New hook allowing to
display the lazy count in special ways.
(isearch-lazy-highlight-new-loop,
isearch-lazy-highlight-buffer-update): Run `lazy-count-update-hook' at
appropriate times.
* lisp/comint.el (comint-history-isearch-setup,
comint-history-isearch-end): Make sure no lazy count is displayed.
* lisp/simple.el (minibuffer-history-isearch-setup): Make sure no lazy
count is displayed.
2022-03-20 22:25:12 +02:00
Juri Linkov
a31be116ae * lisp/tab-bar.el (tab-bar-new-tab-to): Don't funcall const values.
Filter out the values 'clone' and 'window' of 'tab-bar-new-tab-choice'
from function call.
2022-03-20 20:59:04 +02:00
Eli Zaretskii
9fcdd5b63f Improve doc strings of read-char-from-minibuffer-insert-* commands
* lisp/subr.el (read-char-from-minibuffer-insert-char)
(read-char-from-minibuffer-insert-other): Clarify the doc strings.
(Bug#54479)
2022-03-20 18:21:44 +02:00
Manuel Giraud
978681e782 Fix wrong password stored in Tramp
* lisp/net/tramp.el (tramp-process-actions):
Unset `tramp-password-save-function'.
2022-03-20 11:08:31 +01:00
Lars Ingebrigtsen
71b8f1fc63 Make `command-modes' work for (native-compiled) subrs, too
* lisp/emacs-lisp/comp.el (comp-func): Add a command-modes slot.
(comp-spill-lap-function, comp-intern-func-in-ctxt): Fill it.
(comp-emit-for-top-level, comp-emit-lambda-for-top-level): Use it.

* src/alloc.c (mark_object): Mark the command_modes slot.

* src/comp.c (make_subr): Add a command_modes parameter.
(Fcomp__register_lambda): Use it.
(Fcomp__register_subr): Ditto.

* src/data.c (Fcommand_modes): Output the command_modes data for subrs
(bug#54437).

* src/lisp.h (GCALIGNED_STRUCT): Add a command_modes slot.

* src/pdumper.c (dump_subr): Update hash.
(dump_subr): Dump the command_modes slot.
2022-03-19 15:11:37 +01:00
Guy Gastineau
f755daafb9 Remove redundant checks in erc--switch-to-buffer
* lisp/erc/erc.el (erc--switch-to-buffer): Commit
f925fc93ba "Add `predicate' arg to
`read-buffer' and use it for erc-iswitchb" meant to remove this, but
it was left behind. (Bug#53617)

Copyright-paperwork-exempt: yes
2022-03-19 01:47:06 -07:00
Stefan Kangas
5781f0af7d Merge from origin/emacs-28
c4596c8522 Fix a regression in 'decipher-digram-list'
2022-03-19 06:30:38 +01:00
Po Lu
c7f085b53f Document dired-mouse-drag-files
* doc/emacs/dired.texi (Misc Dired Features): Explain that
dragging files is now supported.
* etc/NEWS: Update documentation status.
* lisp/dired.el (dired-mouse-drag-files): Fix typo in doc
string.
2022-03-19 11:35:55 +08:00
Po Lu
808a6f8f5f Fix some glitches when dragging files from dired
* lisp/dired.el (dired-mouse-drag-files): Fix initial values.

(dired-mouse-drag): Clear mark if active and only make button
release events unread.
2022-03-19 10:27:19 +08:00
Jimmy Aguilar Mena
9bcf58d27c cursor-face-highlight-nonselected-window default to nil
* lisp/simple.el (redisplay--update-cursor-face-highlight) : Use if-let*
and not check facep.
(cursor-face-highlight-nonselected-window) : default to nil
2022-03-18 22:57:45 +01:00
Stefan Monnier
ab8a34ce8a * lisp/emacs-lisp/bytecomp.el (byte-compile-make-closure): Minor optimization 2022-03-18 16:07:42 -04:00
Stefan Monnier
ce28de5d3a Pcomplete: Better obey completion-at-point-functions
Functions on `completion-at-point-functions` should not modify
the buffer.  Pcomplete itself mostly abides by this but Eshell's
use of it doesn't.  Try and catch those cases.  Also fix one of
those cases.

* lisp/pcomplete.el (pcomplete-allow-modifications): New var.
(pcomplete-completions-at-point): Enforce it.
(pcomplete, pcomplete-expand-and-complete, pcomplete-expand):
Rebind it since these commands expect the extra side effects.

* lisp/eshell/em-cmpl.el (eshell--pcomplete-insert-tab): New function,
extracted from `eshell-complete-parse-arguments`.
(eshell-complete-parse-arguments): Use it and obey
`pcomplete-allow-modifications`.
2022-03-18 11:59:32 -04:00
Stefan Monnier
f51e12fece * lisp/gnus/mail-source.el (mail-source-set-1): Fix indent and simplify 2022-03-18 11:51:46 -04:00