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

84445 commits

Author SHA1 Message Date
Lars Ingebrigtsen
0613e7c33d Add an instruction header line to string-edit
* lisp/textmodes/string-edit.el (string-edit): Add a header line
with instructions.
2022-04-27 14:08:49 +02:00
Lars Ingebrigtsen
a7f2eb3054 Make isearch respond to 'mouse-yank-at-point'
* doc/emacs/killing.texi (Secondary Selection): Document it.
* lisp/isearch.el (isearch-mouse-2): Make isearch respond to
mouse-yank-at-point (bug#7787).

* lisp/mouse.el (mouse-yank-at-point): Mention it.
2022-04-27 14:02:23 +02:00
Juri Linkov
1e0c4883b7 * lisp/help-fns.el (help-fns--insert-menu-bindings): Don't highlight heading. 2022-04-27 10:36:41 +03:00
Paul Eggert
3abb3681b5 Use org-time-convert-to-integer instead of by hand
* lisp/org/org-macs.el (org-file-newer-than-p):
Don’t assume list-format timestamps, by using
org-time-convert-to-integer instead of doing it by hand.
2022-04-27 00:30:25 -07:00
Po Lu
e13689d55f Fix quitting application from the Deskbar on Haiku
* lisp/term/haiku-win.el (handle-save-session): Kill Emacs
afterwards.
2022-04-27 06:13:18 +00:00
Po Lu
0bea75c95a Add simple session management support to Haiku
* lisp/term/common-win.el (emacs-save-session-functions): Move
from x-win.el to common-win.el.
* lisp/term/haiku-win.el (haiku-save-session-reply)
(emacs-session-save, handle-save-session): New functions.
* lisp/term/x-win.el (emacs-save-session-functions): Delete.

* src/haiku_font_support.cc (font_style_to_flags):
* src/haiku_support.h (enum haiku_font_weight): Turn weight
macros into enum.
(struct haiku_font_pattern): Likewise.
(struct haiku_session_manager_reply): New struct.
* src/haiku_io.c (haiku_io_init): Create sm port.
* src/haiku_support.cc (QuitRequested): Wait for reply from sm
port.
* src/haikufns.c (Fhaiku_save_session_reply): New function.
(syms_of_haikufns): Define new subr.
* src/haikuterm.c (haiku_read_socket): Send session management
events.
(haiku_term_init): Check new port.
2022-04-27 05:19:15 +00:00
Paul Eggert
8c2ea3a708 Avoid change to desktop file format
* lisp/desktop.el (desktop--get-file-modtime): New function.
(desktop-save, desktop-read): Use it.
2022-04-26 21:04:36 -07:00
Paul Eggert
b568a41a5e Be more compatible with older desktops
* lisp/desktop.el (desktop-save): When comparing timestamps use
time-equal-p instead of ‘equal’.
2022-04-26 18:12:53 -07:00
Stefan Monnier
92e49944a3 nadvice.el: Auto-generate the doc describing the "how" arg
* lisp/emacs-lisp/nadvice.el (advice--make-how-alist): New macro.
(advice--how-alist): Use it.
(nadvice--make-docstring): New function.
(add-function, advice-add): Use it to auto-generate the table
describing the accepted values for `how`.
2022-04-26 17:36:13 -04:00
Stefan Monnier
f30625943e nadvice.el: Use OClosures
* lisp/emacs-lisp/nadvice.el (advice): New OClosure type.
(advice--how-alist): Make it hold prototype OClosures rather
than bytecode strings.
(advice--bytecodes): Delete var.
(advice--where): Make it an obsolete alias of new `advice--how`.
(oclosure-interactive-form, cl-print-object) <advice>: New methods.
(advice--make-1): Delete function.
(advice--make): Use `advice-copy` and `advice-cons`.
(advice--tweak): Use `advice-cons`.
(add-function, advice-add): Rename `where` arg to `how`.

* lisp/emacs-lisp/cl-print.el (cl-print-object) <:extra "nadvice">:
Remove now-redundant ad-hoc method.

* test/lisp/emacs-lisp/nadvice-tests.el (advice-test-print): New test.
2022-04-26 17:36:13 -04:00
Stefan Monnier
bc9be5449e nadvice.el: Rename "where" to "how"
* lisp/emacs-lisp/nadvice.el (advice--how-alist): Rename from
`advice--where-alist`.
(advice--how): Rename from `advice--where` and keep obsolete alias.
(add-function, advice-add): Rename `where` arg to `how`.
* lisp/emacs-lisp/cl-print.el (cl-print-object): Use `advice--how` name.
2022-04-26 17:36:13 -04:00
Stefan Monnier
4dba7c31a2 Use advice--cd*r where applicable
* lisp/emacs-lisp/bytecomp.el (byte-compile--function-signature):
* lisp/emacs-lisp/advice.el (ad-get-orig-definition):
* lisp/help.el (help-function-arglist): Use `advice--cd*r`.
2022-04-26 17:36:13 -04:00
Stefan Monnier
21112e3683 Pretty print OClosure slot accessors
* lisp/emacs-lisp/oclosure.el (oclosure--accessor-cl-print): New function.
* lisp/emacs-lisp/cl-print.el (cl-print-object) <accessor>: New method.
* test/lisp/emacs-lisp/nadvice-tests.el (advice-test-call-interactively):
Avoid `defun` within a function.
2022-04-26 17:36:12 -04:00
Paul Eggert
d35b6a49b3 Fix gnus-html-image-cache-ttl FIXME
* lisp/gnus/gnus-html.el (gnus-html-image-cache-ttl):
Make it a seconds count.
2022-04-26 13:54:38 -07:00
Alex Schroeder
516ff422c5 Fix error in rcirc for IRC tags without values
* src/lisp/net/rcirc.el (rcirc-process-server-response-1): If the
optional value for a tag is not present, do not call
replace-regexp-in-string on it. If (match-string 2 tag) is
nil, the STRING argument for the replace-regexp-in-string is nil,
which results in an error.
2022-04-26 18:13:50 +02:00
Stefan Monnier
bffc4cb39d New generic function oclosure-interactive-form
It's used by `interactive-form` when it encounters an OClosure.
This lets one compute the `interactive-form` of OClosures
dynamically by adding appropriate methods.
This does not include support for `command-modes` for Oclosures.

* lisp/simple.el (oclosure-interactive-form): New generic function.

* src/data.c (Finteractive_form): Delegate to
`oclosure-interactive-form` if the arg is an OClosure.
(syms_of_data): New symbol `Qoclosure_interactive_form`.
* src/eval.c (Fcommandp): Delegate to `interactive-form` if the arg is
an OClosure.

* src/lisp.h (VALID_DOCSTRING_P): New function, extracted from
`store_function_docstring`.
* src/doc.c (store_function_docstring): Use it.

* lisp/kmacro.el (kmacro): Don't carry any interactive form.
(oclosure-interactive-form) <kmacro>: New method, instead.

* test/lisp/emacs-lisp/oclosure-tests.el (oclosure-interactive-form)
<oclosure-test>: New method.
(oclosure-test-interactive-form): New test.

* doc/lispref/commands.texi (Using Interactive):
Document `oclosure-interactive-form`.
2022-04-26 10:36:52 -04:00
Lars Ingebrigtsen
756b7cf5d9 Mention caveats in the map-delete doc string
* lisp/emacs-lisp/map.el (map-delete): Mention how this has to be
used for lists (bug#25929).
2022-04-26 15:34:26 +02:00
Lars Ingebrigtsen
a38b7d3e90 Tweak interactive use of delete-windows-on
* lisp/window.el (delete-windows-on): Make prompting better, and
allow specifying only the current frame interactively (bug#34749).
2022-04-26 14:32:07 +02:00
Lars Ingebrigtsen
631a8ae9ee Make `C RET' work in archive-mode
* lisp/arc-mode.el (archive-copy-file): Fix the default value
(when the user hits RET) (bug#55123).
2022-04-26 13:27:17 +02:00
Lars Ingebrigtsen
dd5ca0eaf2 Make new menu *Help* output be more resilient
* lisp/help-fns.el (help-fns--insert-menu-bindings): Only insert
the heading if it turns out that we actually find the menu.
(help-fns--insert-bindings): Tweak calling convention.
2022-04-26 13:23:51 +02:00
Lars Ingebrigtsen
ae877d5511 Add new user option flymake-mode-line-lighter
* doc/misc/flymake.texi (Customizable variables): Document it.

* lisp/progmodes/flymake.el (flymake-mode-line-lighter): New user
option (bug#55115).
(flymake--mode-line-title): Use it.
2022-04-26 12:39:13 +02:00
Dmitry Gutov
39646c822b Fix Ruby indentation with double splat as first block param
* lisp/progmodes/ruby-mode.el (ruby-smie--forward-token)
(ruby-smie--backward-token): Tokenize "**" separately from "|".
Problem reported at https://github.com/dgutov/robe/issues/136.
2022-04-26 05:36:35 +03:00
Paul Eggert
d6c7054ff5 Pacify misc/test-custom-opts
* lisp/gnus/gnus-html.el (gnus-html-image-cache-ttl):
Also allow it to be a cons of integers.
2022-04-25 17:49:47 -07:00
Stefan Monnier
0a151b7c29 cl-generic.el: Upcase formal args in C-h o
Try and improve the display of methods in `C-h o` by moving
the qualifiers to a separate line and upcasing the formal args.
It still needs love, tho.

* lisp/emacs-lisp/cl-generic.el: Upcase formal args in `C-h o`
(cl--generic-upcase-formal-args): New function.
(cl--generic-describe): Use it.
2022-04-25 15:41:21 -04:00
Lars Ingebrigtsen
fd1ca094bc Change the display of menu bindings in *Help*
* lisp/help-fns.el (help-fns--insert-menu-bindings): New function
to describe menu entries more fully (bug#52870).
(help-fns--key-bindings): Use it.
2022-04-25 21:14:33 +02:00
Glenn Morris
f2a4dc66c2 Fix type of word-wrap-whitespace-characters
* lisp/textmodes/word-wrap-mode.el (word-wrap-whitespace-characters):
Fix type.
; Ref https://hydra.nixos.org/build/174560242
2022-04-25 11:44:03 -07:00
Karl Fogel
42366383c6 Update bookmark sort indicator at proper time
This follows up to my commit 8b071c77b0 of 2022-04-24.  Thanks to
Manuel Giraud <manuel@ledu-giraud.fr> for reporting the buglet.
2022-04-25 12:30:02 -05:00
Po Lu
ec4dabc238 Make default Haiku tool bar color match system preferences
* lisp/faces.el (tool-bar): Use system bar color as the default
tool-bar background color on Haiku.
2022-04-25 12:27:15 +00:00
Lars Ingebrigtsen
a956305f99 Move the Incremental Search menu one menu up
* lisp/menu-bar.el (menu-bar-search-menu): Move the Incremental
Search from the Search menu...
(menu-bar-edit-menu): ... one step up (bug#43308).
2022-04-25 14:09:53 +02:00
Michael Albinus
d932c402aa Add test for Tramp password handling
* lisp/net/tramp.el (tramp-error-show-message-timeout): New defvar.
(tramp-error-with-buffer, tramp-user-error): Use it.

* test/lisp/net/tramp-tests.el (tramp-error-show-message-timeout):
Set it to nil.
(tramp-test46-read-password): New test.
(tramp-test47-auto-load, tramp-test47-delay-load)
(tramp-test47-recursive-load, tramp-test47-remote-load-path)
(tramp-test48-unload):
* test/lisp/net/tramp-archive-tests.el (tramp-archive-test47-auto-load)
(tramp-archive-test47-delay-load): Rename.
2022-04-25 12:57:01 +02:00
Lars Ingebrigtsen
dad2a41a2a Make flymake-show-buffer-diagnostics error out in non-Flymake buffers
* lisp/progmodes/flymake.el (flymake-show-buffer-diagnostics):
Signal an error if run outside of a buffer with Flymake enabled
(bug#55097).
2022-04-25 10:05:44 +02:00
Lars Ingebrigtsen
e1d0632003 Fix up some string-edit.el strings
* lisp/textmodes/string-edit.el (string-edit)
(read-string-from-buffer): Make doc strings use dynamic key
bindings.
(string-edit): Fix message at the end.
2022-04-25 09:47:54 +02:00
Karl Fogel
8b071c77b0 Improve sorting in the bookmark list buffer
- Ensure that the bookmark bmenu buffer sorts when it should.
  - Sort case-insensitively and by locale-dependent collation order.
  - Rename "Bookmark" column to "Bookmark Name".
  - Coordinate that column's sort toggle and `bookmark-sort-flag'.
  - Document the new behavior.

* lisp/bookmark.el (bookmark-bmenu--name-predicate,
bookmark-bmenu--type-predicate, bookmark-bmenu--file-predicate): Use
`string-collate-lessp' with IGNORE-CASE argument, instead of plain
`string<'.
(bookmark-bmenu--revert): Sort based on `bookmark-sort-flag'.
(bookmark-bmenu-mode): Document the new behavior.   Rename the
"Bookmark" column to "Bookmark Name" for clarity & documentabilty.
2022-04-24 14:07:21 -05:00
Lars Ingebrigtsen
1a6fa4c5d5 Use C-c C-k' instead of C-c C-d' to abort in string-edit
* lisp/textmodes/string-edit.el (string-edit-mode-map): Use `C-c
C-k' to abort.
2022-04-24 16:06:43 +02:00
Lars Ingebrigtsen
07f8fafe6b Further help-fns--editable-variable fixes
* lisp/help-fns.el (help-fns--editable-variable): Don't bug out on
non-symbols.
2022-04-24 16:03:12 +02:00
Lars Ingebrigtsen
ae3e3900a2 Provide help when doing (shell-command "... &") on buffer collisions
* lisp/simple.el (shell-command--same-buffer-confirm): New
function (bug#13649).
(shell-command): Use it to provide fuller help.
2022-04-24 15:48:29 +02:00
Lars Ingebrigtsen
8ee21db4af Add new function `read-string-from-buffer'.
* doc/lispref/minibuf.texi (Text from Minibuffer): Document it.
* lisp/textmodes/string-edit.el: New file.
2022-04-24 15:16:00 +02:00
Eli Zaretskii
f3434fe2f3 ; Fix last change 'display-local-help' and its documentation
* etc/NEWS:
* doc/emacs/help.texi (Help Summary): Fix typo and wording of
documentation of 'C-u C-h .'.
* lisp/help-at-pt.el (display-local-help): Avoid byte-compiler
warnings.  Fix wording of doc string.
2022-04-24 15:47:08 +03:00
Lars Ingebrigtsen
4d5fd01749 Allow 'C-u C-h .' to describe button/widgets
* doc/emacs/help.texi (Help Summary): Document it.
* lisp/help-at-pt.el (display-local-help): Display button/widget
help (bug#54963).
2022-04-24 13:53:17 +02:00
Lars Ingebrigtsen
e632c7bd80 Ensure that the global sql-buffer variable is set
* lisp/progmodes/sql.el (sql-product-interactive): Set the
expected global value of sql-buffer (bug#55088).
2022-04-24 13:39:36 +02:00
Po Lu
66ad6564a2 * lisp/term/haiku-win.el (x-colors): Also update with system colors. 2022-04-24 05:44:16 +00:00
Po Lu
e2d870016c Allow looking up window system colors on Haiku
* lisp/help-fns.el (help-fns--editable-variable): Fix describing
variables which don't have symbol values.
* lisp/term/haiku-win.el (haiku-allowed-ui-colors): Set list of
allowed UI colors.
* src/haiku_support.cc (be_get_ui_color): New function.
* src/haiku_support.h: Update prototypes.
* src/haikufns.c (haiku_get_color): Look for defined UI color.
(syms_of_haikufns): New defvar `haiku-allowed-ui-colors'.
* src/haikuterm.c (haiku_term_init): Fix coding style.
2022-04-24 05:37:22 +00:00
Alan Mackenzie
9c346270f9 CC Mode: New alignment function c-lineup-argcont-+
This fixes bug #21409.

* lisp/progmodes/cc-align.el (c-lineup-argcont-1): New function, mainly
extracted from c-lineup-argcont.
(c-lineup-argcont): Refactored to use the new function above.
(c-lineup-argcont-+): New function.

* doc/misc/cc-mode.texi (Operator Line-Up): Add a new piece for
c-lineup-argcont-+.
2022-04-23 20:02:49 +00:00
Juri Linkov
164a7ebdbc Allow not clearing the echo area
* doc/lispref/display.texi (Displaying Messages): Document it.
* lisp/minibuffer.el (clear-minibuffer-message): Return nil.

* src/xdisp.c (clear_message): Respect the dont-clear-message
value.
2022-04-23 17:17:15 +02:00
Lars Ingebrigtsen
655b39bd4b Don't have help-fns--editable-variable override link buttons
* lisp/help-fns.el (help-fns--editable-variable): Don't override
link buttons (bug#40774).
2022-04-23 17:01:55 +02:00
Lars Ingebrigtsen
5bc5e56576 Make elisp-flymake-byte-compile clean up on failures
* lisp/progmodes/elisp-mode.el (elisp-flymake-byte-compile): Clean
up no matter what the exit status of the process is (bug#55056).
2022-04-23 14:52:45 +02:00
Lars Ingebrigtsen
2c0a01ee38 Don't make a header if the user hasn't specified columns in vtable
* lisp/emacs-lisp/vtable.el (vtable):
(make-vtable): Store whether the user has specified the columns.
(vtable-insert): Don't insert a header line or a header if the
user hasn't specified the columns (bug#55075).
2022-04-23 14:47:55 +02:00
Filipp Gunbin
ca5fb2b922 Fix prompts in sql-get-login again
* lisp/progmodes/sql.el (sql-get-login-ext): Use prompt-def
everywhere.
(sql-get-login): Revert previous fix (bug#52546).
2022-04-23 14:29:45 +02:00
Lars Ingebrigtsen
daf82f61bb Regenerated ldefs-boot.el 2022-04-23 14:13:10 +02:00
Lars Ingebrigtsen
c789430331 Add new minor mode word-wrap-whitespace-mode
* doc/emacs/display.texi (Visual Line Mode): Document it.
* lisp/textmodes/word-wrap-mode.el: New minor mode.
2022-04-23 14:13:10 +02:00