]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agonadvice.el: Auto-generate the doc describing the "how" arg
Stefan Monnier [Tue, 26 Apr 2022 21:09:03 +0000 (17:09 -0400)]
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`.

2 years agonadvice.el: Use OClosures
Stefan Monnier [Tue, 26 Apr 2022 20:39:41 +0000 (16:39 -0400)]
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.

2 years agonadvice.el: Rename "where" to "how"
Stefan Monnier [Tue, 26 Apr 2022 20:28:54 +0000 (16:28 -0400)]
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.

2 years agoUse `advice--cd*r` where applicable
Stefan Monnier [Tue, 26 Apr 2022 21:31:13 +0000 (17:31 -0400)]
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`.

2 years agoPretty print OClosure slot accessors
Stefan Monnier [Tue, 26 Apr 2022 21:30:29 +0000 (17:30 -0400)]
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.

2 years agoFix gnus-html-image-cache-ttl FIXME
Paul Eggert [Tue, 26 Apr 2022 00:57:50 +0000 (17:57 -0700)]
Fix gnus-html-image-cache-ttl FIXME

* lisp/gnus/gnus-html.el (gnus-html-image-cache-ttl):
Make it a seconds count.

2 years agoFix error in rcirc for IRC tags without values
Alex Schroeder [Sun, 24 Apr 2022 11:33:09 +0000 (13:33 +0200)]
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.

2 years agoNew generic function `oclosure-interactive-form`
Stefan Monnier [Tue, 26 Apr 2022 14:36:52 +0000 (10:36 -0400)]
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`.

2 years agoMention caveats in the map-delete doc string
Lars Ingebrigtsen [Tue, 26 Apr 2022 13:32:45 +0000 (15:32 +0200)]
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).

2 years agoFix EWMH window activation
Po Lu [Tue, 26 Apr 2022 12:43:15 +0000 (20:43 +0800)]
Fix EWMH window activation

* src/xterm.c (x_ewmh_activate_frame): Add missing fields of
message.  (bug#55122)

2 years agoTweak interactive use of delete-windows-on
Lars Ingebrigtsen [Tue, 26 Apr 2022 12:32:07 +0000 (14:32 +0200)]
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).

2 years agoMake `C RET' work in archive-mode
Lars Ingebrigtsen [Tue, 26 Apr 2022 11:27:17 +0000 (13:27 +0200)]
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).

2 years agoMake new menu *Help* output be more resilient
Lars Ingebrigtsen [Tue, 26 Apr 2022 11:23:51 +0000 (13:23 +0200)]
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.

2 years agoAdd new user option flymake-mode-line-lighter
Lars Ingebrigtsen [Tue, 26 Apr 2022 10:39:13 +0000 (12:39 +0200)]
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.

2 years agoImprove documentation for t value for reusable-frames
Lars Ingebrigtsen [Tue, 26 Apr 2022 10:11:49 +0000 (12:11 +0200)]
Improve documentation for t value for reusable-frames

* doc/lispref/windows.texi (Buffer Display Action Alists): Note
that the t value is rarely a good one (bug#55103).

2 years agoFix event mask of activation client message
Po Lu [Tue, 26 Apr 2022 04:38:52 +0000 (12:38 +0800)]
Fix event mask of activation client message

* src/xterm.c (x_alloc_lighter_color):
(x_get_scale_factor): Minor formatting fixes.
(x_ewmh_activate_frame): Fix event mask used to send message to
the root window.

2 years ago* src/xterm.c (x_scroll_run): Only flush GC if really necessary.
Po Lu [Tue, 26 Apr 2022 03:57:47 +0000 (11:57 +0800)]
* src/xterm.c (x_scroll_run): Only flush GC if really necessary.

2 years agoFix Ruby indentation with double splat as first block param
Dmitry Gutov [Tue, 26 Apr 2022 02:36:35 +0000 (05:36 +0300)]
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.

2 years agoCache relief colors on Haiku since their computation is expensive
Po Lu [Tue, 26 Apr 2022 01:19:56 +0000 (01:19 +0000)]
Cache relief colors on Haiku since their computation is expensive

* src/haikufns.c (haiku_create_frame, haiku_create_tip_frame):
Clear `relief_background'.
* src/haikuterm.c (haiku_calculate_relief_colors): Cache relief
colors for each frame.
* src/haikuterm.h (struct haiku_output): New fields for caching
the last relief color.

2 years agoPacify misc/test-custom-opts
Paul Eggert [Tue, 26 Apr 2022 00:49:23 +0000 (17:49 -0700)]
Pacify misc/test-custom-opts

* lisp/gnus/gnus-html.el (gnus-html-image-cache-ttl):
Also allow it to be a cons of integers.

2 years agocl-generic.el: Upcase formal args in `C-h o`
Stefan Monnier [Mon, 25 Apr 2022 19:41:04 +0000 (15:41 -0400)]
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.

2 years agoUse (TICKS . HZ) for current-time etc.
Paul Eggert [Mon, 25 Apr 2022 18:56:48 +0000 (11:56 -0700)]
Use (TICKS . HZ) for current-time etc.

* src/timefns.c (CURRENT_TIME_LIST): Change default to false.
All documentation changed.

2 years agoSupport (encode-time (list s m h D M Y))
Paul Eggert [Mon, 25 Apr 2022 18:56:48 +0000 (11:56 -0700)]
Support (encode-time (list s m h D M Y))

* src/timefns.c (Fencode_time): Add support for a 6-elt list arg.
Requested by Max Nikulin for Org (bug#54764).
* test/src/timefns-tests.el (encode-time-alternate-apis): New test.

2 years agoChange the display of menu bindings in *Help*
Lars Ingebrigtsen [Mon, 25 Apr 2022 19:14:24 +0000 (21:14 +0200)]
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.

2 years agoFix type of word-wrap-whitespace-characters
Glenn Morris [Mon, 25 Apr 2022 18:44:03 +0000 (11:44 -0700)]
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

2 years agoFix nsmenu compilation under macOS 10.6
Alan Third [Tue, 19 Apr 2022 04:05:17 +0000 (05:05 +0100)]
Fix nsmenu compilation under macOS 10.6

* src/nsmenu.m ([EmacsMenu fillWithWidgetValue:]): Replace modern
shorthand dictionary and array definitions.
* src/nsterm.h (NSTextAlignmentRight): Redefine if necessary.
* src/macfont.m (mac_font_create_preferred_family_for_attributes):
isOperatingSystemAtLeastVersion is new in macOS 10.10, so it's
probably wrong to use it to check whether we're below 10.9.
(mac_font_copy_default_descriptors_for_language):
(mac_font_copy_default_name_for_charset_and_languages): It seems these
functions are only used on macOS 10.8 and below.
* src/nsterm.m ([NSColor colorUsingDefaultColorSpace]): Use the
generic colorspace.
(ns_parent_window_rect):
(ns_frame_scale_factor):
([EmacsWindow setParentChildRelationships]): Fix macOS version stuff.

Co-authored-by: Po Lu <luangruo@yahoo.com>
2 years agoUpdate bookmark sort indicator at proper time
Karl Fogel [Mon, 25 Apr 2022 17:30:02 +0000 (12:30 -0500)]
Update bookmark sort indicator at proper time

This follows up to my commit 8b071c77b0d7 of 2022-04-24.  Thanks to
Manuel Giraud <manuel@ledu-giraud.fr> for reporting the buglet.

2 years agoMake default Haiku tool bar color match system preferences
Po Lu [Mon, 25 Apr 2022 12:26:44 +0000 (12:26 +0000)]
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.

2 years agoMove the Incremental Search menu one menu up
Lars Ingebrigtsen [Mon, 25 Apr 2022 12:09:46 +0000 (14:09 +0200)]
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).

2 years agoProtect against the host name containing an alpha character
Lars Ingebrigtsen [Mon, 25 Apr 2022 08:46:28 +0000 (10:46 +0200)]
Protect against the host name containing an alpha character

* src/filelock.c (lock_file_1, current_lock_owner): Protect
against the unlikely case that the host name contains an alpha
character (bug#14250).

2 years agoAdd test for Tramp password handling
Michael Albinus [Mon, 25 Apr 2022 10:57:01 +0000 (12:57 +0200)]
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.

2 years ago; Fix typos in tec/NEWS
Michael Albinus [Mon, 25 Apr 2022 08:37:04 +0000 (10:37 +0200)]
; Fix typos in tec/NEWS

2 years agoMake flymake-show-buffer-diagnostics error out in non-Flymake buffers
Lars Ingebrigtsen [Mon, 25 Apr 2022 08:05:44 +0000 (10:05 +0200)]
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).

2 years agoFix up some string-edit.el strings
Lars Ingebrigtsen [Mon, 25 Apr 2022 07:47:54 +0000 (09:47 +0200)]
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.

2 years agoDelete some unused functions on Haiku
Po Lu [Mon, 25 Apr 2022 05:51:42 +0000 (05:51 +0000)]
Delete some unused functions on Haiku

* src/haiku_support.cc (haiku_current_workspace)
(BWindow_workspaces):
* src/haiku_support.h: Remove unused functions and prototypes.

2 years agoGet rid of autorelease warnings during building on GNUstep
Po Lu [Mon, 25 Apr 2022 05:42:44 +0000 (13:42 +0800)]
Get rid of autorelease warnings during building on GNUstep

* src/emacs.c (decode_env_path):
* src/nsfns.m (ns_appkit_version_str):
* src/nsterm.m (ns_term_shutdown): Setup autorelease when
objects might be autoreleased during building.

2 years ago* src/nsfns.m (Fns_list_colors): Fix autoreleasing.
Po Lu [Mon, 25 Apr 2022 04:13:22 +0000 (12:13 +0800)]
* src/nsfns.m (Fns_list_colors): Fix autoreleasing.

2 years agoSet last user time during drag-and-drop
Po Lu [Mon, 25 Apr 2022 01:00:13 +0000 (09:00 +0800)]
Set last user time during drag-and-drop

* src/xterm.c (XTmouse_position): Set last user time if
track-mouse is drag-source or dropping.

2 years agoFix 32-bit Haiku build
Po Lu [Mon, 25 Apr 2022 00:40:53 +0000 (00:40 +0000)]
Fix 32-bit Haiku build

* src/haiku_support.h (be_get_ui_color): Fix prototype.

2 years agoImprove sorting in the bookmark list buffer
Karl Fogel [Sun, 24 Apr 2022 19:07:21 +0000 (14:07 -0500)]
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.

2 years agoFix typo in cl.texi example
Aleksandr Vityazev [Sun, 24 Apr 2022 15:19:46 +0000 (17:19 +0200)]
Fix typo in cl.texi example

* doc/misc/cl.texi (Argument Lists): Fix typo (bug#55092).

2 years agoUse `C-c C-k' instead of `C-c C-d' to abort in string-edit
Lars Ingebrigtsen [Sun, 24 Apr 2022 14:06:43 +0000 (16:06 +0200)]
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.

2 years agoFurther help-fns--editable-variable fixes
Lars Ingebrigtsen [Sun, 24 Apr 2022 14:03:12 +0000 (16:03 +0200)]
Further help-fns--editable-variable fixes

* lisp/help-fns.el (help-fns--editable-variable): Don't bug out on
non-symbols.

2 years agoProvide help when doing (shell-command "... &") on buffer collisions
Lars Ingebrigtsen [Sun, 24 Apr 2022 13:48:29 +0000 (15:48 +0200)]
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.

2 years agoAdd new function `read-string-from-buffer'.
Lars Ingebrigtsen [Sun, 24 Apr 2022 13:14:53 +0000 (15:14 +0200)]
Add new function `read-string-from-buffer'.

* doc/lispref/minibuf.texi (Text from Minibuffer): Document it.
* lisp/textmodes/string-edit.el: New file.

2 years ago; * etc/NEWS: Fix last change.
Eli Zaretskii [Sun, 24 Apr 2022 12:48:50 +0000 (15:48 +0300)]
; * etc/NEWS: Fix last change.

2 years ago; Fix last change 'display-local-help' and its documentation
Eli Zaretskii [Sun, 24 Apr 2022 12:47:08 +0000 (15:47 +0300)]
; 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.

2 years agoAllow 'C-u C-h .' to describe button/widgets
Lars Ingebrigtsen [Sun, 24 Apr 2022 11:53:17 +0000 (13:53 +0200)]
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).

2 years agoEnsure that the global sql-buffer variable is set
Lars Ingebrigtsen [Sun, 24 Apr 2022 11:39:36 +0000 (13:39 +0200)]
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).

2 years ago* lisp/term/haiku-win.el (x-colors): Also update with system colors.
Po Lu [Sun, 24 Apr 2022 05:44:07 +0000 (05:44 +0000)]
* lisp/term/haiku-win.el (x-colors): Also update with system colors.

2 years agoAllow looking up window system colors on Haiku
Po Lu [Sun, 24 Apr 2022 05:37:22 +0000 (05:37 +0000)]
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.

2 years agoFix disabling double buffering on Haiku
Po Lu [Sun, 24 Apr 2022 02:55:19 +0000 (02:55 +0000)]
Fix disabling double buffering on Haiku

* src/haikufns.c (haiku_set_inhibit_double_buffering): Garbage
frame correctly after changing double buffering.
* src/haikuterm.c (haiku_calculate_relief_colors)
(haiku_draw_relief_rect, haiku_draw_underwave): Clean up coding
style.

2 years agoSpeed up color cache lookup on X
Po Lu [Sun, 24 Apr 2022 00:44:18 +0000 (08:44 +0800)]
Speed up color cache lookup on X

* src/xterm.c (x_hash_string_ignore_case): New function.
(x_parse_color): Turn color cache into a hash table.
(x_term_init): Allocate color cache.
(x_delete_display): Free color cache correctly.
* src/xterm.h (struct x_display_info): Turn color cache into a
hash table and add appropriate fields.

2 years agoCC Mode: New alignment function c-lineup-argcont-+
Alan Mackenzie [Sat, 23 Apr 2022 20:02:49 +0000 (20:02 +0000)]
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-+.

2 years agoNEWS copy editing
Lars Ingebrigtsen [Sat, 23 Apr 2022 17:31:07 +0000 (19:31 +0200)]
NEWS copy editing

2 years agoFix elc.gz loading test some more
Lars Ingebrigtsen [Sat, 23 Apr 2022 16:37:27 +0000 (18:37 +0200)]
Fix elc.gz loading test some more

2 years agoAdd a failing test case for bug#12598
Lars Ingebrigtsen [Sat, 23 Apr 2022 16:14:26 +0000 (18:14 +0200)]
Add a failing test case for bug#12598

Author:

2 years agoAllow not clearing the echo area
Juri Linkov [Sat, 23 Apr 2022 15:17:15 +0000 (17:17 +0200)]
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.

2 years agoDon't have help-fns--editable-variable override link buttons
Lars Ingebrigtsen [Sat, 23 Apr 2022 15:01:46 +0000 (17:01 +0200)]
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).

2 years ago; Improve doc strings of completion primitives
Eli Zaretskii [Sat, 23 Apr 2022 14:15:27 +0000 (17:15 +0300)]
; Improve doc strings of completion primitives

* src/minibuf.c (Ftry_completion, Fall_completions): Clarify the
doc strings.

2 years agoMention the case of the result in the try-completion doc string
Lars Ingebrigtsen [Sat, 23 Apr 2022 13:16:41 +0000 (15:16 +0200)]
Mention the case of the result in the try-completion doc string

* src/minibuf.c (Ftry_completion): Mention the case of the results
(bug#39484).

2 years agoMake elisp-flymake-byte-compile clean up on failures
Lars Ingebrigtsen [Sat, 23 Apr 2022 12:52:45 +0000 (14:52 +0200)]
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).

2 years agoDon't make a header if the user hasn't specified columns in vtable
Lars Ingebrigtsen [Sat, 23 Apr 2022 12:47:55 +0000 (14:47 +0200)]
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).

2 years agoFix prompts in sql-get-login again
Filipp Gunbin [Sat, 23 Apr 2022 12:29:45 +0000 (14:29 +0200)]
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).

2 years agoRegenerated ldefs-boot.el
Lars Ingebrigtsen [Sat, 23 Apr 2022 12:12:57 +0000 (14:12 +0200)]
Regenerated ldefs-boot.el

2 years agoAdd new minor mode word-wrap-whitespace-mode
Lars Ingebrigtsen [Sat, 23 Apr 2022 12:12:18 +0000 (14:12 +0200)]
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.

2 years agoFix key navigation of Lucid menus on XI2
Po Lu [Sat, 23 Apr 2022 11:34:46 +0000 (19:34 +0800)]
Fix key navigation of Lucid menus on XI2

* src/xmenu.c (popup_get_selection): Fix cookie claiming of
input extension events.
(Fx_menu_bar_open_internal): Use right timestamps on XI2.
* src/xterm.c (handle_one_xevent): Dispatch XI2 key events via
Xt when popup is active.

2 years agoAvoid unnecessary calculations when handling button events during DND
Po Lu [Sat, 23 Apr 2022 02:04:33 +0000 (10:04 +0800)]
Avoid unnecessary calculations when handling button events during DND

* src/xterm.c (handle_one_xevent): Only calculate DND grab for
button release events.

2 years agoAvoid clearing splash screen message during DND on Haiku
Po Lu [Sat, 23 Apr 2022 00:36:45 +0000 (00:36 +0000)]
Avoid clearing splash screen message during DND on Haiku

* src/haikuterm.c (haiku_read_socket): Respect any_help_event_p
when sending help events for DND.

2 years agoByte compiler: Prevent special forms' symbols being replaced by bare symbols
Alan Mackenzie [Fri, 22 Apr 2022 19:11:31 +0000 (19:11 +0000)]
Byte compiler: Prevent special forms' symbols being replaced by bare symbols

These are symbols with position from source code, which should not be replaced
by bare symbols in, e.g., optimization functions.

* lisp/Makefile.in: (BYTE_COMPILE_FLAGS, compile-first case): Set
max-specpdl-size to 5000 for the benefit of lisp/emacs-lisp/comp.el.

* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker)
(byte-optimize--rename-var, byte-optimize-if, byte-optimize-letX)
* lisp/emacs-lisp/bytecomp.el (byte-compile-recurse-toplevel)
(byte-compile-lambda)
* lisp/emacs-lisp/cconv.el (cconv-convert)
* lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Preserve, e.g., (car
form) in the byte compiler, when this form's car is a symbol with position of
a special form, rather than replacing the symbol with a bare symbol, e.g.
'cond.

2 years agoByte compiler: correct output warning message positions (part 2)
Alan Mackenzie [Fri, 22 Apr 2022 17:16:21 +0000 (17:16 +0000)]
Byte compiler: correct output warning message positions (part 2)

A supplementary commit to that on 2022-04-18:

* lisp/emacs-lisp/bytecomp.el (byte-compile--first-symbol-with-pos): Handle
vectors and records correctly.

* lisp/emacs-lisp/byte-run.el (byte-run--ssp-seen): Correct the doc string.

2 years agoFurther doc string quoting fixes
Lars Ingebrigtsen [Fri, 22 Apr 2022 15:16:42 +0000 (17:16 +0200)]
Further doc string quoting fixes

* test/lisp/progmodes/cperl-mode-tests.el (cperl--run-test-cases):
* lisp/simple.el (undo-equiv-table):
* lisp/shell.el (shell-mode):
(shell-mode):
* lisp/recentf.el (recentf-mode):
* lisp/org/ob-table.el (org-sbe):
* lisp/net/eudc.el (eudc-rfc5322-cctext-token):
* lisp/mail/ietf-drums-date.el (ietf-drums-date--slot-ranges):
* lisp/faces.el (color-luminance-dark-limit):
* lisp/erc/erc.el (erc-tls):
* lisp/emacs-lisp/pcase.el (pcase-setq): Further quoting fixes in
doc strings.

2 years agoAudit quoting the quote character in doc strings
Lars Ingebrigtsen [Fri, 22 Apr 2022 14:17:22 +0000 (16:17 +0200)]
Audit quoting the quote character in doc strings

* test/src/regex-emacs-tests.el (regex-tests-compare):
(regex-tests-compare):
(regex-tests-match):
* test/lisp/xml-tests.el (xml-parse-tests--qnames):
* test/lisp/mh-e/mh-thread-tests.el (mh-thread-tests-before-from):
* test/lisp/cedet/srecode-utest-template.el (srecode-utest-map-reset):
* test/lisp/calc/calc-tests.el (calc-tests-equal):
* lisp/window.el (get-lru-window):
(get-mru-window):
(get-largest-window):
(quit-restore-window):
(display-buffer):
* lisp/vc/vc-rcs.el (vc-rcs-consult-headers):
* lisp/url/url-auth.el (url-digest-auth-build-response):
* lisp/tutorial.el (tutorial--find-changed-keys):
* lisp/transient.el (transient-suffix-object):
* lisp/textmodes/rst.el (rst-insert-list-new-item):
* lisp/textmodes/bibtex.el (bibtex-clean-entry):
* lisp/tab-bar.el (tab-bar--key-to-number):
(toggle-frame-tab-bar):
* lisp/ses.el (ses-recalculate-cell):
(ses-define-local-printer):
(ses-prin1):
* lisp/progmodes/xref.el (xref--find-ignores-arguments):
* lisp/progmodes/verilog-mode.el (verilog-single-declaration-end):
* lisp/progmodes/tcl.el (tcl-mode-hook):
* lisp/progmodes/gdb-mi.el (gdb-get-buffer-create):
* lisp/progmodes/elisp-mode.el (elisp--xref-make-xref):
* lisp/play/dunnet.el (dun-room-objects):
* lisp/outline.el (outline--cycle-state):
* lisp/org/ox-publish.el (org-publish-find-property):
* lisp/org/ox-html.el (org-html--unlabel-latex-environment):
* lisp/org/org-table.el (org-table-collapse-header):
* lisp/org/org-plot.el (org--plot/prime-factors):
* lisp/org/org-agenda.el (org-agenda--mark-blocked-entry):
(org-agenda-set-restriction-lock):
* lisp/org/ob-lua.el (org-babel-lua-read-string):
* lisp/org/ob-julia.el (org-babel-julia-evaluate-external-process):
(org-babel-julia-evaluate-session):
* lisp/org/ob-core.el (org-babel-default-header-args):
* lisp/obsolete/mouse-sel.el (mouse-select):
(mouse-select-secondary):
* lisp/net/tramp.el (tramp-methods):
* lisp/net/eww.el (eww-accept-content-types):
* lisp/net/dictionary-connection.el (dictionary-connection-status):
* lisp/minibuffer.el (completion-flex--make-flex-pattern):
* lisp/mh-e/mh-mime.el (mh-have-file-command):
* lisp/mh-e/mh-limit.el (mh-subject-to-sequence):
(mh-subject-to-sequence-threaded):
(mh-subject-to-sequence-unthreaded):
* lisp/mail/feedmail.el (feedmail-queue-buffer-file-name):
(feedmail-vm-mail-mode):
* lisp/ls-lisp.el (ls-lisp--sanitize-switches):
* lisp/keymap.el (key-valid-p):
* lisp/international/ccl.el (ccl-compile-branch-blocks):
* lisp/image/image-converter.el (image-convert):
* lisp/gnus/spam.el (spam-backend-check):
* lisp/gnus/nnselect.el (nnselect-generate-artlist):
* lisp/gnus/nnmairix.el (nnmairix-widget-other):
* lisp/gnus/message.el (message-mailto):
* lisp/gnus/gnus-sum.el (gnus-collect-urls-from-article):
* lisp/gnus/gnus-search.el (gnus-search-prepare-query):
* lisp/frame.el (frame-size-history):
* lisp/eshell/esh-var.el (eshell-parse-variable-ref):
* lisp/eshell/em-dirs.el (eshell-expand-multiple-dots):
* lisp/erc/erc-backend.el (erc-bounds-of-word-at-point):
* lisp/emulation/cua-rect.el (cua--rectangle-operation):
* lisp/emacs-lisp/text-property-search.el (text-property-search-forward):
* lisp/emacs-lisp/package.el (package-desc-suffix):
* lisp/emacs-lisp/faceup.el (faceup-test-explain):
* lisp/emacs-lisp/comp.el (comp-curr-allocation-class):
(comp-alloc-class-to-container):
(comp-add-cstrs):
(comp-remove-type-hints-func):
(batch-byte+native-compile):
* lisp/emacs-lisp/cl-macs.el (cl--optimize):
* lisp/elec-pair.el (electric-pair--syntax-ppss):
* lisp/doc-view.el (doc-view-doc-type):
* lisp/cedet/semantic/symref.el (semantic-symref-tool-alist):
(semantic-symref-hit-to-tag-via-db):
(semantic-symref-hit-to-tag-via-buffer):
* lisp/cedet/semantic/lex-spp.el (semantic-lex-spp-get-overlay):
* lisp/cedet/semantic/java.el (semantic-java-doc-keywords-map):
* lisp/cedet/semantic/find.el (semantic-brute-find-tag-by-function):
* lisp/cedet/semantic/db.el (semanticdb-project-predicate-functions):
* lisp/cedet/semantic.el (semantic-working-type):
* lisp/cedet/ede/files.el (ede-flush-directory-hash):
* lisp/calc/calc.el (calc--header-line):
* lisp/auth-source.el (auth-source-pick-first-password):
(auth-source--decode-octal-string):
* etc/themes/modus-themes.el (modus-themes--paren):
(modus-themes--agenda-habit):
* admin/cus-test.el (cus-test-vars-with-changed-state): Fix
quoting in doc strings.  In code examples, the ' character is
quoted with \\=, and regularize 'foo to `foo', and quote strings
like "foo" instead of 'foo'.

2 years agoFix map-into doc string example
Lars Ingebrigtsen [Fri, 22 Apr 2022 13:17:15 +0000 (15:17 +0200)]
Fix map-into doc string example

* lisp/emacs-lisp/map.el (map-into): Fix quote quoting in example.

2 years agoMake `C-u C-x =' be more verbose about invisible characters
Lars Ingebrigtsen [Fri, 22 Apr 2022 12:58:59 +0000 (14:58 +0200)]
Make `C-u C-x =' be more verbose about invisible characters

* lisp/descr-text.el (describe-text-properties-1): Note confusing
bits about invisible characters (bug#3400).

2 years agoAllow completion-ignore-case to be buffer-local
Lars Ingebrigtsen [Fri, 22 Apr 2022 12:34:50 +0000 (14:34 +0200)]
Allow completion-ignore-case to be buffer-local

* lisp/minibuffer.el (completing-read-default): Use the value of
completion-ignore-case from the current buffer (bug#12615).

2 years agoFix problem with (narrow-to-page 1) with point at point-max
Lars Ingebrigtsen [Fri, 22 Apr 2022 12:04:43 +0000 (14:04 +0200)]
Fix problem with (narrow-to-page 1) with point at point-max

* lisp/textmodes/page.el (forward-page): Make this work more
consistently if point is on bol (bug#20663).

2 years ago; Improve comments for a recently installed bugfix
Eli Zaretskii [Fri, 22 Apr 2022 12:18:56 +0000 (15:18 +0300)]
; Improve comments for a recently installed bugfix

* lisp/startup.el (command-line): Remove references to a wrong bug
number and improve comments for delaying the 'user-emacs-directory'
warning.  (Bug#25163)

2 years agoDon't transfer window attributes trying to find the XM drag window
Po Lu [Fri, 22 Apr 2022 11:43:42 +0000 (19:43 +0800)]
Don't transfer window attributes trying to find the XM drag window

* src/xterm.c (xm_get_drag_window): Select for impossible event
mask instead of asking for the window attributes.

2 years agoFix default frame name on Haiku
Po Lu [Fri, 22 Apr 2022 05:42:09 +0000 (05:42 +0000)]
Fix default frame name on Haiku

* src/haikufns.c (haiku_set_background_color)
(haiku_set_cursor_color, haiku_get_pixel, haiku_put_pixel)
(haiku_set_internal_border_width)
(haiku_set_inhibit_double_buffering)
(Fhaiku_mouse_absolute_pixel_position, Fxw_color_defined_p)
(Fxw_color_values, Fx_double_buffered_p)
(Fx_display_backing_store): Clean up coding style.
(haiku_set_name): Use correct default name and don't cons extra
string all the time.

* src/haikuterm.c (haiku_read_socket): Remove unused variable.
(haiku_term_init): Set default name.
(mark_haiku_display): Mark new field.

* src/haikuterm.h (struct haiku_display_info): New field
`default_name'.

2 years agoAdd an option to disable XI2 for debugging purposes
Po Lu [Fri, 22 Apr 2022 01:06:44 +0000 (09:06 +0800)]
Add an option to disable XI2 for debugging purposes

* src/xterm.c (handle_one_xevent): Accept resource
`disableInputExtension', which means to skip setting up the X
input extension.

2 years agoEUDC: Handle nil BOB button label
Thomas Fitzsimmons [Thu, 21 Apr 2022 21:24:29 +0000 (17:24 -0400)]
EUDC: Handle nil BOB button label

* lisp/net/eudc-bob.el (eudc-bob-make-button): Do not throw error
when label is nil.

2 years agoNew electric forward slash Eshell module
Sean Whitton [Sat, 16 Apr 2022 15:23:14 +0000 (08:23 -0700)]
New electric forward slash Eshell module

* lisp/eshell/em-elecslash.el: New file.
* etc/NEWS:
* doc/misc/eshell.texi (Electric forward slash): Document the module.
(Make / electric): Retitle to "Make / more electric", update, add
"@noindent", and standardize terminology.

2 years agoBind 'imenu' to 'M-g i' globally
Sean Whitton [Thu, 14 Apr 2022 14:12:41 +0000 (07:12 -0700)]
Bind 'imenu' to 'M-g i' globally

Another candidate was 'M-s i'.  Discussion on emacs-devel has led me
to conclude that most people will find 'M-g i' more intuitive and thus
easier to memorize.

* lisp/bindings.el (goto-map): Bind 'imenu' to 'M-g i' globally.
* etc/NEWS: Document the change.
* doc/emacs/programs.texi (Imenu):
* lisp/progmodes/cperl-mode.el: Replace 'M-x imenu' with 'M-g i'.

2 years agoRespect user-emacs-directory-warning in startup
Tino Calancha [Thu, 21 Apr 2022 15:27:50 +0000 (17:27 +0200)]
Respect user-emacs-directory-warning in startup

* lisp/startup.el (command-line): If user-emacs-directory is not
accessible, delay to show a warning until all command line args
are processed (bug#25163).

2 years agoAllow searching for regexps with a prefix
Lars Ingebrigtsen [Thu, 21 Apr 2022 15:05:23 +0000 (17:05 +0200)]
Allow searching for regexps with a prefix

* doc/misc/info.texi (Search Index): Mention it.

* lisp/info.el (Info-find-node): Allow not signalling errors.
(Info-apropos-matches): Allow taking a regexp.
(info-apropos): Prefix now means looking for a regexp.

2 years agoFix indentation in copy-region-as-kill
Lars Ingebrigtsen [Thu, 21 Apr 2022 14:23:02 +0000 (16:23 +0200)]
Fix indentation in copy-region-as-kill

* lisp/simple.el (copy-region-as-kill): Fix indendation.

2 years agoClarify cl-incf/decf doc strings
Lars Ingebrigtsen [Thu, 21 Apr 2022 13:11:25 +0000 (15:11 +0200)]
Clarify cl-incf/decf doc strings

* lisp/emacs-lisp/cl-lib.el (cl-incf):
(cl-decf): Clarify that nil isn't a valid value for X (bug#31715).

2 years ago* src/haiku_support.cc (gui_abort): Get rid of extern "C" declarations.
Po Lu [Thu, 21 Apr 2022 12:41:09 +0000 (12:41 +0000)]
* src/haiku_support.cc (gui_abort): Get rid of extern "C" declarations.

2 years agoLink dired-do-find-regexp-and-replace to query-replace
Lars Ingebrigtsen [Thu, 21 Apr 2022 11:48:16 +0000 (13:48 +0200)]
Link dired-do-find-regexp-and-replace to query-replace

* lisp/dired-aux.el (dired-do-find-regexp-and-replace): Link to
`query-replace' (bug#55050).

2 years agoUnbreak build with MinGW64.
Eli Zaretskii [Thu, 21 Apr 2022 10:53:57 +0000 (13:53 +0300)]
Unbreak build with MinGW64.

* src/w32.c (CONSOLE_FONT_INFO): Define only when _WIN32_WINNT is
less than _WIN32_WINNT_WINXP, i.e. for building with mingw.org's
MinGW.

2 years agognus: fix %a in topic line
Andreas Schwab [Wed, 20 Apr 2022 15:05:32 +0000 (17:05 +0200)]
gnus: fix %a in topic line

* lisp/gnus/gnus-topic.el (gnus-topic-insert-topic-line): Also
bind `entries'.

2 years agoClean up PGTK code some more
Po Lu [Thu, 21 Apr 2022 08:30:03 +0000 (16:30 +0800)]
Clean up PGTK code some more

* src/pgtkterm.c (x_alloc_lighter_color): Simplify.  Do not try
to "allocate" colors, remove unused flag and impossible return
value.
(pgtk_clear_frame): Remove unused code from NS port and remove
incorrect workaround for now-fixed double buffering.
(pgtk_make_frame_visible_wait_for_map_event_cb)
(x_clear_glyph_string_rect, x_draw_glyph_string_background)
(x_draw_glyph_string_foreground)
(x_draw_composite_glyph_string_foreground)
(x_draw_glyphless_glyph_string_foreground)
(x_fill_trapezoid_for_relief, x_erase_corners_for_relief)
(pgtk_setup_relief_color, x_draw_relief_rect, x_draw_box_rect)
(x_draw_glyph_string_box, x_get_scale_factor)
(x_draw_horizontal_wave, pgtk_draw_horizontal_wave)
(x_draw_underwave, x_draw_image_relief)
(x_draw_glyph_string_bg_rect, x_cr_draw_image)
(x_draw_image_foreground, x_draw_image_glyph_string)
(x_draw_stretch_glyph_string, pgtk_draw_glyph_string)
(x_draw_hollow_cursor, x_draw_bar_cursor, pgtk_draw_window_cursor)
(pgtk_cr_draw_image, pgtk_draw_fringe_bitmap, hourglass_cb)
(pgtk_show_hourglass, pgtk_redraw_scroll_bars, pgtk_flash)
(x_create_toolkit_scroll_bar)
(x_create_horizontal_toolkit_scroll_bar, x_scroll_bar_create)
(x_scroll_bar_remove, pgtk_set_vertical_scroll_bar)
(pgtk_set_horizontal_scroll_bar, pgtk_judge_scroll_bars)
(x_new_focus_frame, x_focus_changed, enter_notify_event)
(leave_notify_event, focus_in_event, focus_out_event)
(pgtk_cr_accumulate_data): Clean up coding style, rename
functions copied over from X and modified, and remove duplicate
definition of at least one function.

2 years agoDon't leave xm drag initiator info around
Po Lu [Thu, 21 Apr 2022 05:52:50 +0000 (13:52 +0800)]
Don't leave xm drag initiator info around

* src/xterm.c (x_cleanup_drag_and_drop)
(x_begin_drag_and_drop): Don't confuse GTK+ 2.x by leaving drag
initiator info around after DND completes.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Thu, 21 Apr 2022 04:30:28 +0000 (06:30 +0200)]
Merge from origin/emacs-28

dbb2dd6939 ; Fix wording of "File Notifications" in the ELisp manual

2 years ago; Merge from origin/emacs-28
Stefan Kangas [Thu, 21 Apr 2022 04:30:28 +0000 (06:30 +0200)]
; Merge from origin/emacs-28

The following commits were skipped:

e6c2a2497d Update from gnulib
91d4898d5c Revert prompting changes in viper-cmd

2 years agoUse a cache on Haiku to avoid constantly reading fonts during font lookup
Po Lu [Thu, 21 Apr 2022 03:09:22 +0000 (03:09 +0000)]
Use a cache on Haiku to avoid constantly reading fonts during font lookup

* src/haiku_font_support.cc (struct font_object_cache_bucket):
New struct.
(language_code_points): Make `int'.
(hash_string): New function.
(cache_font_object_data, lookup_font_object_data)
(font_object_has_chars): New functions.
(font_check_wanted_chars, font_check_one_of)
(font_check_language): Lookup in cached font object instead.
(be_init_font_data, be_evict_font_cache): New functions.

* src/haiku_support.h (struct haiku_font_pattern): Make
`uint32_t's ints instead.
* src/haikufont.c (haikufont_apply_registry, syms_of_haikufont):
Adjust for those changes.

* src/haikuterm.c (haiku_frame_up_to_date): Clear font lookup
cache every 50 updates.

2 years agoMake some frame params work on Haiku tooltip frames
Po Lu [Thu, 21 Apr 2022 00:37:07 +0000 (00:37 +0000)]
Make some frame params work on Haiku tooltip frames

* src/haiku_support.cc (RecomputeFeel): Handle tooltips.
(BWindow_set_tooltip_decoration): Use RecomputeFeel instead of
setting window feel by hand.

2 years agoMore encode-time pitfall doc fixes
Paul Eggert [Wed, 20 Apr 2022 19:03:19 +0000 (12:03 -0700)]
More encode-time pitfall doc fixes

* doc/lispref/os.texi (Time Conversion): Improve discussion of
encode-time pitfalls based on comments by Max Nikulin (Bug#54764#63).

2 years ago; Fix wording of "File Notifications" in the ELisp manual
Eli Zaretskii [Wed, 20 Apr 2022 17:00:15 +0000 (20:00 +0300)]
; Fix wording of "File Notifications" in the ELisp manual

* doc/lispref/os.texi (File Notifications): Fix typos,
punctuation, and wording.