1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-24 22:40:51 -08:00
Commit graph

84287 commits

Author SHA1 Message Date
Mattias Engdegård
9aecc241e6 Fix typo in ERC DCC code in verbose mode
* lisp/erc/erc-dcc.el (erc-dcc-send-block): Typo causing incorrect
message when `erc-dcc-verbose` is set.
2022-03-29 11:17:08 +02:00
Stefan Monnier
2b5ea36ce9 * lisp/emacs-lisp/oclosure.el (oclosure--define): Autoload 2022-03-29 03:23:38 -04:00
Po Lu
55932a65ed Temporarily fix the oclosure bootstrap
* lisp/emacs-lisp/oclosure.el (oclosure-define): Load oclosure
from source if `oclosure--define' is not defined during byte
compilation.
2022-03-29 13:58:40 +08:00
Juri Linkov
935cc42795 Add search function to search within filenames in Dired and WDired (bug#14013)
* lisp/dired-aux.el (dired-isearch-filenames-mode): Use
dired-isearch-search-filenames on isearch-search-fun-function
instead of dired-isearch-filter-filenames on isearch-filter-predicate.
(dired-isearch-filter-filenames): Remove function.
(dired-isearch-search-filenames): Add function.

* lisp/isearch.el (isearch-message-prefix): Add isearch-search-fun-function
to the list of supported advice-functions along with isearch-filter-predicate.

* lisp/replace.el (replace-search): Add comment.

* lisp/wdired.el (wdired-search-replace-filenames): New defcustom.
(wdired-isearch-filter-read-only): Remove function.
(wdired-change-to-wdired-mode, wdired-change-to-dired-mode):
Add and remove dired-isearch-search-filenames on isearch-search-fun-function
instead of wdired-isearch-filter-read-only on isearch-filter-predicate.
Also set/unset replace-search-function and replace-re-search-function.
Remove and restore isearch-mode-hook with dired-isearch-filenames-setup.
The problem is that dired-isearch-filenames-setup adds
dired-isearch-filenames-end to isearch-mode-end-hook that removes
dired-isearch-search-filenames added to isearch-search-fun-function
in wdired-change-to-wdired-mode.  Then replace-highlight can't use
dired-isearch-search-filenames.
2022-03-28 21:00:32 +03:00
Stefan Monnier
52d5771e0a Add OClosures, a cross between functions and structs
We here just add the new type.  It is not fully self-contained.
It requires cooperation from `cconv.el` on the one hand, and it
hijacks the docstring info to hold the type of OClosure objects.
This does imply that OClosures can't have docstrings, tho this
limitation will be lifted in subsequent patches.

* lisp/emacs-lisp/oclosure.el: New file.
* test/lisp/emacs-lisp/oclosure-tests.el: New file.
* doc/lispref/functions.texi (OClosures): New section.

* src/eval.c (Ffunction): Accept symbols instead of strings for docstrings.
* src/doc.c (store_function_docstring): Avoid overwriting an OClosure type.
* lisp/emacs-lisp/cconv.el (cconv--convert-function): Tweak ordering of
captured variables.
(cconv-convert): Add case for `oclosure--fix-type`.
2022-03-28 10:53:14 -04:00
Po Lu
3f19a23c1f Fix doc of gui-get-selection' as to what is really valid as data'
* doc/lispref/frames.texi (Window System Selections):
* lisp/select.el (gui-set-selection): Don't say `data' can be a
cons or list of two integers, since that's not supported.
2022-03-28 20:35:16 +08:00
Po Lu
fbbb9148cc Minor fixes to Haiku selection support
* lisp/term/haiku-win.el (haiku-selection-bounds): New function.
(haiku-dnd-convert-string, haiku-select-encode-xstring)
(haiku-select-encode-utf-8-string): Handle position pairs
correctly.
(gui-backend-set-selection): Adjust for new airity.
* src/haikuselect.c (Fhaiku_selection_put): Fix arity.
2022-03-28 12:28:53 +00:00
Michael Albinus
a5841b196f Do not register Tramp file name handlers twice
* lisp/net/tramp.el (tramp-register-autoload-file-name-handlers):
* lisp/net/tramp-archive.el (tramp-register-archive-file-name-handler):
Check, whether the real file name handler is already registered.
2022-03-28 12:02:23 +02:00
Po Lu
be21c95842 Store latin-1 content into the Haiku clipboard as well
* lisp/term/haiku-win.el (haiku-normal-selection-encoders): New
variable.
(haiku-select-encode-utf-8-string, haiku-select-encode-xstring):
New functions.
(gui-backend-set-selection): Use new selection encoder functions
instead of hard-coding UTF-8.
(haiku-dnd-handle-drag-n-drop-event): Rename to
`haiku-drag-and-drop'.

* src/haiku_select.cc (be_lock_clipboard_message): Accept new
argument `clear'.
(be_unlock_clipboard): Accept new argument `discard'.

* src/haikuselect.c (Fhaiku_selection_data): Change calls to
`be_lock_clipboard_message' and `be_unlock_clipboard'.
(haiku_unwind_clipboard_lock): New function.
(Fhaiku_selection_put): Accept new meaning of `name' which means
to set the selection message.

* src/haikuselect.h: Update prototypes.
2022-03-27 13:36:45 +00:00
Augusto Stoffel
d361144f61 Always run 'isearch-lazy-count-update-hook' with point at match
* lisp/isearch.el (isearch-lazy-highlight-buffer-update):  Run
'isearch-lazy-count-update-hook' outside of save-excursion, so point
is at the current match.
2022-03-27 10:48:07 +03:00
Eli Zaretskii
968af794ba * lisp/desktop.el (desktop-read): Clarify warning text. 2022-03-27 08:10:27 +03:00
Michael Albinus
f8ff5689a2 ; Improve readablity in grep.el
* lisp/progmodes/grep.el (grep-compute-defaults): Set a more
readable value for `grep-quoting-style'.
2022-03-26 10:40:16 +01:00
Michael Albinus
6aafb92167 Don't let Tramp block dired (Bug#54542)
* lisp/dired.el (dired-find-buffer-nocreate): Avoid avoid hangs in
remote buffers with a blocked connection.  (Bug#54542)

* lisp/net/tramp-sh.el (tramp-maybe-open-connection):
Extend suppression rules.
2022-03-26 10:39:39 +01:00
Eli Zaretskii
de953a6fe3 Improve 'desktop--emacs-pid-running-p'
* lisp/desktop.el (desktop--emacs-pid-running-p): Avoid false
negatives on MS-Windows and with some symlinks to Emacs
executables.  (Bug#1474)
2022-03-26 10:28:52 +03:00
Stefan Kangas
f7e83d9673 Merge from origin/emacs-28
4ec9f9edd1 Fix eshell-explicit-command-char doc string typo
2022-03-26 06:30:21 +01:00
Po Lu
66f6324a58 Fix compiler warning in x-dnd.el
* lisp/x-dnd.el (x-dnd-xdnd-to-action): Move declaration
earlier.
2022-03-26 10:17:12 +08:00
Po Lu
5359062be6 Avoid ClientMessage overhead when dragging stuff to other frames
* lisp/dired.el (dired-mouse-drag): Handle correctly dragging
from dired buffers in nonselected windows.
* lisp/x-dnd.el (x-dnd-handle-drag-n-drop-event): Understand new
client message type.
* src/xterm.c (x_dnd_send_enter, x_dnd_send_position)
(x_dnd_send_leave): Ignore if window is the top window of a
frame.
(x_dnd_send_drop): Send special DND event in that case.
2022-03-26 10:15:53 +08:00
Po Lu
21ecf6b24d Fix minor issues with dired-mouse-drag-files
* lisp/dired.el (dired-mouse-drag-files): Update doc string and
add setter.
(dired-insert-set-properties): Don't insert misleading tooltip
if feature is not available.
2022-03-26 08:45:08 +08:00
Andrew G Cohen
3b6e74f08e ; * lisp/gnus/nnselect.el (nnselect-get-artlist): Fix last change. 2022-03-26 07:04:39 +08:00
Andrew G Cohen
413ef5a7e6 ; Restore regexp-quote for gnus subject match
* lisp/gnus/gnus-sum.el (gnus-summary-limit-include-thread): Restore
regexp-quote that was inadvertently dropped in commit 2021-12-21 "Fix
gnus subject matching when subject is empty".
2022-03-26 06:23:20 +08:00
Lars Ingebrigtsen
4ec9f9edd1 Fix eshell-explicit-command-char doc string typo
* lisp/eshell/esh-ext.el (eshell-explicit-command-char): Fix typo
in doc string (bug#54567).
2022-03-25 19:02:04 +01:00
Lars Ingebrigtsen
4eabca26d3 Fix (bounds-of-thing-at-point 'number)
* lisp/thingatpt.el (number): Make (bounds-of-thing-at-point
'number) work (bug#54555).
2022-03-25 17:32:40 +01:00
Lars Ingebrigtsen
3e7257c3ed Improve pp-last-sexp ergonomics
* lisp/emacs-lisp/pp.el (pp-last-sexp): Ignore ,@?
before a sexp, because eval-ing that will always lead to an error
(bug#54537).
2022-03-25 16:44:30 +01:00
Po Lu
4dfd42014b Implement new drag and drop parameter on Haiku
* lisp/term/haiku-win.el (x-begin-drag): Implement
`allow-current-frame'.
* src/haiku_support.cc (be_drag_message): New argument
`allow_same_view'.
* src/haiku_support.h: Update prototypes.
* src/haikuselect.c (Fhaiku_drag_message): New parameter
`allow-same-frame'.
2022-03-25 13:41:30 +00:00
Po Lu
8ba0f19064 Allow dragging files from dired to windows on the same frame
* doc/lispref/frames.texi (Drag and Drop): Document new
parameter to `x-begin-drag'.
* lisp/dired.el (dired-mouse-drag): Utilize new parameter.
* lisp/term/haiku-win.el (x-begin-drag): Add new parameter.
* src/xfns.c (Fx_begin_drag): New parameter
`allow-current-frame'.  Fix typo and update doc string.
* src/xterm.c (x_dnd_get_window_proto): Respect
`x_dnd_allow_current_frame'.
(x_dnd_begin_drag_and_drop): New parameter
`allow_current_frame'.
* src/xterm.h: Update prototypes.
2022-03-25 21:24:27 +08:00
Eli Zaretskii
ab414c5661 Improve documentation of 'completion-auto-select'
* lisp/simple.el (completion-auto-select):
* doc/emacs/mini.texi (Completion Options): Improve documentation
and description of customization options of 'completion-auto-select'.
2022-03-25 15:39:44 +03:00
Po Lu
3fac06dfb8 Make it easier to select text inside dired when mouse dragging is on
* lisp/dired.el (dired-insert-set-properties): Only set drag
keymap on the filename itself.
2022-03-25 20:34:18 +08:00
Philip Kaludercic
392d66f6f5 Fix wrapping of 'previous-completion' at the beginning of buffer
* lisp/simple.el (next-completion): Prevent an error of
'previous-completion' at the beginning of completions buffer.
Also fix 'previous-completion' to wrap to the last completion.
(bug#54374)
2022-03-24 20:11:01 +02:00
Juri Linkov
71aec1d044 Small fixes for the new feature 'second-tab' of 'completion-auto-select'
* lisp/simple.el (completion-auto-select): Extend the docstring.
2022-03-24 19:54:14 +02:00
Augusto Stoffel
45978f97be Handle invisible text in Eldoc when calculating size
Co-authored-by: João Távora <joaotavora@gmail.com>

* lisp/emacs-lisp/eldoc.el (eldoc--echo-area-substring,
eldoc-display-in-echo-area):  Take invisible text into consideration
when counting lines to crop an echo-area message.
(Version): Bump.
2022-03-24 15:06:05 +00:00
Michael Albinus
34c7f14668 Adapt Tramp to dired--insert-disk-space assumptions
* lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory):
* lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory):
Do not modify disk space information when
`dired--insert-disk-space' is available.  (Bug#54512)
2022-03-24 12:50:34 +01:00
Lars Ingebrigtsen
b97aa560ab Fix autoinsert.el byte compilation warning
* lisp/autoinsert.el (sgml-tag): Fix a byte compilation warning.
2022-03-24 11:39:13 +01:00
Jimmy Aguilar Mena
3a349ff648 Add completion-auto-select second-tab value.
* lisp/minibuffer.el (completion--in-region-1) : Change if with cond and
check if completion-auto-select.
* lisp/simple.el (completion-auto-select) : Move before first use.
(completion-setup-function) : Make a more precise check for when
completion-auto-select is t.
2022-03-24 11:18:05 +01:00
Stefan Monnier
288ecdf90c * lisp/select.el (xselect-convert-to-targets): Use delete-dups and delq 2022-03-24 05:32:10 -04:00
Stefan Monnier
f7a90cc85b * lisp/autoinsert.el (auto-insert-alist): Expose lambdas as code 2022-03-24 05:19:19 -04:00
Stefan Monnier
774e007d90 (archive-*-write-file-member): Fix relative file name
* lisp/arc-mode.el (archive-*-write-file-member): Set the pwd
2022-03-24 05:13:11 -04:00
Lars Ingebrigtsen
0e739909ab Fix image-mode-fit-frame some more
* lisp/image-mode.el (image-mode-fit-frame): Use frame-text-width
and fit-frame-to-buffer instead of computing things ourselves
(bug#37630).  This makes things work better across platforms.
2022-03-24 09:54:56 +01:00
Stefan Kangas
b4f504a0ea Load desktop without prompting if process is dead
* doc/emacs/misc.texi (Saving Emacs Sessions): Document the new
'check' value.
* etc/NEWS: Announce the change (bug#1474).
* lisp/desktop.el (desktop-load-locked-desktop): Add new value 'check'
to load desktop file without prompting if locking Emacs process does
not exist on the local machine.  (Bug#1474)
(desktop-read): Extract function from here...
(desktop--load-locked-desktop-p): ...to here.  New function handles
the semantics of 'desktop-load-locked-desktop', including above new
value 'check'.
(desktop--emacs-pid-running-p): New function.

* test/lisp/desktop-tests.el: New file with tests for the above.
2022-03-24 09:23:31 +01:00
Po Lu
72ab6c4f14 Fix setter for hl-line-sticky-flag when hl-line is not loaded
* lisp/hl-line.el (hl-line-sticky-flag): Wrap most of setter
around (featurep 'hl-line).  Reported by Michael Heerdegen
<michael_heerdegen@web.de>.
2022-03-24 13:50:55 +08:00
Po Lu
17393c0db0 Allow dragging and dropping multiple actions
* doc/lispref/frames.texi (Drag and Drop): Document new meaning
of `action'.
* lisp/term/haiku-win.el (x-begin-drag): Correct for new meaning
of `action'.
* src/xfns.c (Fx_begin_drag): Handle new alist meaning of
`action'.
* src/xterm.c (x_dnd_begin_drag_and_drop): New parameters
`ask_action_list', `ask_action_names' and `n_ask_actions'.
* src/xterm.h: Update prototypes.
2022-03-24 09:42:47 +08:00
Augusto Stoffel
ac3bb7e754 Fix regression in isearch-yank-char-in-minibuffer
* lisp/isearch.el (isearch-yank-char-in-minibuffer): Select the
original window in order to restore point.  This is needed when
minibuffer lazy highlight is in effect.
2022-03-23 22:06:07 +02:00
Mauro Aranda
4ec23d922d Make undigest work with multipart/mixed messages
* test/lisp/mail/undigest.el: New test file (bug#12873).
* lisp/mail/undigest.el (rmail-digest-methods): Install
rmail-digest-parse-mixed-mime.
(rmail-content-type-boundary): New function, to get a specific
Content-type boundary.
(rmail-digest-parse-mixed-mime): New function, to search for a
multipart/digest message inside a multipart/mixed message.
2022-03-23 20:44:32 +01:00
Michael Albinus
ef0a0d30c5 Make quoting of shell arguments in grep.el more robust
* lisp/progmodes/grep.el (grep-apply-setting)
(grep-compute-defaults): Adapt docstring.
(grep-quoting-style): New variable.
(grep-compute-defaults, grep-default-command)
(grep-expand-keywords, lgrep, rgrep-default-command): Use it.
2022-03-23 19:54:53 +01:00
Michael Albinus
fdbee9bc4c Support changing remoteness of DIR in rgrep and lgrep
* lisp/net/tramp-sh.el (tramp-get-remote-dev-tty): New defun.
(tramp-sh-handle-make-process): Use it.

* lisp/progmodes/grep.el: Prefer #' to quote named functions.
(lgrep, rgrep): Recompute grep defaults when the remoteness of DIR
changes.
2022-03-23 16:04:57 +01:00
Po Lu
7fa5d6c87d Improvements to Haiku selection handling
* lisp/term/haiku-win.el (haiku-selection-targets): Implement in Lisp.
* src/haiku_select.cc (be_get_message_type):
(be_set_message_type):
(be_get_message_message):
(be_add_message_message): New functions.

* src/haiku_support.cc (MessageReceived): Fix typo.
* src/haikuselect.c (haiku_selection_data_1)
(Fhaiku_selection_targets): Delete functions.
(haiku_message_to_lisp, lisp_to_type_code)
(haiku_lisp_to_message): Correctly decode and encode nested
messages, and fix encoding specially decoded types via numeric
names.  Also store and decode message types inside Lisp
messages.
(Fhaiku_drag_message): Update doc string.
(syms_of_haikuselect): Update subrs.
* src/haikuselect.h: Update prototypes.
2022-03-23 14:16:15 +00:00
Lars Ingebrigtsen
36810a8164 Reinstate `C-M-<delete>'
* lisp/bindings.el (global-map): Reinstate `C-M-<delete>' and
`C-M-<backspace>' (bug#29430).  These used to kill X, but that
hasn't been the case in any common GNU/Linux distributions for
decades.
2022-03-23 14:29:03 +01:00
Lars Ingebrigtsen
e5e5d85369 Fix image-mode-fit-frame resizing
* lisp/image-mode.el (image-mode-fit-frame): Use pixel sizes
instead of lines/columns to get more accurate resizing (bug#37630).
2022-03-23 14:19:22 +01:00
Andreas Schwab
59260ec598 * lisp/term/pgtk-win.el: Update header comment. 2022-03-23 14:14:04 +01:00
Po Lu
5811741eda Fix hl-line tests
* lisp/hl-line.el (hl-line-mode): Restore old setter.
* test/lisp/hl-line-tests.el (hl-line-tests-verify): Don't rely
`cl-some' always returning t on success.
(hl-line-tests-sticky-across-frames): Use correct global variable.
2022-03-23 20:25:33 +08:00
Po Lu
b49d249ee5 * lisp/calendar/todo-mode.el: Restore old code. 2022-03-23 16:51:01 +08:00