]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years ago(gnus-inverse-list-range-intersection): Update alias
Stefan Monnier [Mon, 4 Jul 2022 22:44:03 +0000 (18:44 -0400)]
(gnus-inverse-list-range-intersection): Update alias

* lisp/gnus/gnus-range.el (gnus-inverse-list-range-intersection):
Don't alias to an obsolete alias.

2 years agoFix core dump with x-get-local-selection
Paul Eggert [Mon, 4 Jul 2022 21:21:35 +0000 (16:21 -0500)]
Fix core dump with x-get-local-selection

* src/xselect.c (Fx_get_local_selection): Check that VALUE has 4
elements, since x_get_local_selection can dump core otherwise.
This pacifies gcc -Wanalyzer-null-dereference, which found the
problem.

2 years agoAdd quit-window entry to list-timers menu
Stefan Kangas [Mon, 4 Jul 2022 16:44:24 +0000 (18:44 +0200)]
Add quit-window entry to list-timers menu

* lisp/emacs-lisp/timer-list.el (timer-list-mode-map): Add
quit-window entry to menu.

2 years agoPrefer defvar-keymap in emacs-lisp/*.el
Stefan Kangas [Mon, 4 Jul 2022 16:42:26 +0000 (18:42 +0200)]
Prefer defvar-keymap in emacs-lisp/*.el

* lisp/emacs-lisp/backtrace.el (backtrace-mode-map):
* lisp/emacs-lisp/bytecomp.el (emacs-lisp-compilation-mode-map):
* lisp/emacs-lisp/checkdoc.el (checkdoc-minor-mode-map):
* lisp/emacs-lisp/crm.el (crm-local-completion-map)
(crm-local-must-match-map):
* lisp/emacs-lisp/debug.el (debugger-mode-map):
* lisp/emacs-lisp/edebug.el (edebug-mode-map, edebug-global-map)
(edebug-eval-mode-map):
* lisp/emacs-lisp/eieio-custom.el (eieio-custom-mode-map):
* lisp/emacs-lisp/elp.el (elp-results-symname-map):
* lisp/emacs-lisp/lisp-mode.el (lisp-mode-shared-map):
* lisp/emacs-lisp/re-builder.el (reb-mode-map)
(reb-lisp-mode-map, reb-subexp-mode-map):
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-mode-map)
(tabulated-list-sort-button-map):
* lisp/emacs-lisp/timer-list.el (timer-list-mode-map):

2 years agoDocument using make-composed-keymap with defvar-keymap
Stefan Kangas [Mon, 4 Jul 2022 16:19:20 +0000 (18:19 +0200)]
Document using make-composed-keymap with defvar-keymap

* doc/lispref/keymaps.texi (Inheritance and Keymaps): Document
using 'make-composed-keymap' with 'defvar-keymap'.

* lisp/help-mode.el (help-mode-map): Use defvar-keymap to make this
code match the above documentation change.

2 years ago; Fix warning in mwheel.el
Stefan Kangas [Mon, 4 Jul 2022 14:58:53 +0000 (16:58 +0200)]
; Fix warning in mwheel.el

* lisp/mwheel.el (global-text-scale-adjust): Declare function.

2 years agoDoc fix; quote keys in face-remap.el
Stefan Kangas [Mon, 4 Jul 2022 14:54:38 +0000 (16:54 +0200)]
Doc fix; quote keys in face-remap.el

* lisp/face-remap.el (text-scale-adjust, global-text-scale-adjust):
Doc fix; quote keys.

2 years agoInherit instead of copying keymap in bookmark.el
Stefan Kangas [Mon, 4 Jul 2022 14:18:54 +0000 (16:18 +0200)]
Inherit instead of copying keymap in bookmark.el

* lisp/bookmark.el (bookmark-rename): Inherit instead of copying
keymap.

2 years ago* src/keymap.c (Fcopy_keymap): Document using defvar-keymap.
Stefan Kangas [Mon, 4 Jul 2022 14:02:26 +0000 (16:02 +0200)]
* src/keymap.c (Fcopy_keymap): Document using defvar-keymap.

2 years ago; remove regexp ambiguity
Mattias Engdegård [Mon, 4 Jul 2022 13:54:14 +0000 (15:54 +0200)]
; remove regexp ambiguity

2 years agoUse substitute-command-keys in Helper-help
Stefan Kangas [Mon, 4 Jul 2022 13:45:18 +0000 (15:45 +0200)]
Use substitute-command-keys in Helper-help

* lisp/emacs-lisp/helper.el (Helper-help-scroller)
(Helper-help-options, Helper-help): Use substitute-command-keys.
(Helper-help-map): Prefer defvar-keymap.

2 years agoAvoid code duplication converting XI event state in toolkit menu code
Po Lu [Mon, 4 Jul 2022 13:03:02 +0000 (21:03 +0800)]
Avoid code duplication converting XI event state in toolkit menu code

* src/xmenu.c (x_menu_translate_generic_event):
(popup_get_selection): Use `xi_convert_event_state' instead.
* src/xterm.c (xi_convert_event_state): Export on non-GTK
builds.
* src/xterm.h: Update prototypes.

2 years agoFix scrolling backwards in Helper-help
Stefan Kangas [Mon, 4 Jul 2022 13:06:52 +0000 (15:06 +0200)]
Fix scrolling backwards in Helper-help

* lisp/emacs-lisp/helper.el (Helper-help-scroller): Fix scrolling
backwards.

2 years agoRemove some useless `eval-when-compile`
Mattias Engdegård [Mon, 4 Jul 2022 12:52:50 +0000 (14:52 +0200)]
Remove some useless `eval-when-compile`

* lisp/cedet/semantic/java.el (semantic-java-number-regexp):
* lisp/cedet/semantic/lex.el (semantic-lex-number-expression):
* lisp/emacs-lisp/cl-indent.el (common-lisp-indent-function-1):
* lisp/emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression)
(lisp--el-match-keyword, lisp-string-in-doc-position-p):
* lisp/emacs-lisp/shorthands.el (shorthands-font-lock-shorthands):
* lisp/net/socks.el (socks-send-command):
* lisp/progmodes/meta-mode.el (meta-font-lock-keywords):
* lisp/shell.el (shell--parse-pcomplete-arguments):
* lisp/textmodes/sgml-mode.el (sgml-mode):
* lisp/textmodes/tex-mode.el (tex--guess-mode)
(tex-common-initialization, tex-input-files-re):
* lisp/textmodes/tildify.el (tildify-mode):
* lisp/xdg.el (xdg-line-regexp):
Eliminate `eval-when-compile` when the argument would be evaluated by
the compiler anyway.

2 years agoReplace lisp-mode-symbol-regexp with (rx lisp-mode-symbol)
Mattias Engdegård [Mon, 4 Jul 2022 12:12:24 +0000 (14:12 +0200)]
Replace lisp-mode-symbol-regexp with (rx lisp-mode-symbol)

This is shorter, simplifies use inside rx expressions, and removes
need for eval-when-compile elsewhere (for later exploitation).

* lisp/emacs-lisp/lisp-mode.el (lisp-mode-symbol): New rx-define.
(lisp-mode-symbol-regexp): Redefine using lisp-mode-symbol.
(lisp-imenu-generic-expression, lisp--el-match-keyword)
(lisp-fdefs, lisp-string-in-doc-position-p):
* lisp/emacs-lisp/checkdoc.el (checkdoc--error-bad-format-p):
* lisp/emacs-lisp/shorthands.el (shorthands-font-lock-shorthands):
Use lisp-mode-symbol instead of lisp-mode-symbol-regexp.

2 years ago* lisp/progmodes/ebrowse.el (ebrowse-tree-mode): Fix typo.
Stefan Kangas [Mon, 4 Jul 2022 12:53:16 +0000 (14:53 +0200)]
* lisp/progmodes/ebrowse.el (ebrowse-tree-mode): Fix typo.

2 years agoRemove remaining Helper-help support from view-mode
Stefan Kangas [Mon, 4 Jul 2022 12:10:04 +0000 (14:10 +0200)]
Remove remaining Helper-help support from view-mode

* lisp/view.el (view-old-Helper-return-blurb): Make obsolete.
(view--enable, view--disable): Delete remaining Helper-help support
code; view-mode stopped using it in 1995.

2 years ago; Fix doc strings in help-fns.el
Eli Zaretskii [Mon, 4 Jul 2022 12:13:12 +0000 (15:13 +0300)]
; Fix doc strings in help-fns.el

* lisp/help-fns.el (help-fns-edit-mode-done)
(help-fns-edit-mode-cancel): Doc fixes.

2 years ago; Fix documentation of 'file-parent-directory'
Eli Zaretskii [Mon, 4 Jul 2022 11:59:58 +0000 (14:59 +0300)]
; Fix documentation of 'file-parent-directory'

* doc/lispref/files.texi (Directory Names):
* lisp/files.el (file-parent-directory): Improve wording of the
documentation of 'file-parent-directory'.  (Bug#56355)

2 years agoAdd file-parent-directory function
Daanturo [Mon, 4 Jul 2022 11:07:51 +0000 (13:07 +0200)]
Add file-parent-directory function

* doc/lispref/files.texi: Document the function.
* etc/NEWS: Add its entry.
* lisp/emacs-lisp/shortdoc.el: Add it to 'file-name' group.
* lisp/files.el: implementation (bug#56355).

2 years agolisp/thumbs.el: Fix calling the "convert" command
Benjamin Riefenstahl [Mon, 4 Jul 2022 10:57:34 +0000 (12:57 +0200)]
lisp/thumbs.el: Fix calling the "convert" command

* lisp/thumbs.el (thumbs-call-convert): Pass 'action-prefix' and
'action' as a combined parameter.  Do not pass 'arg' if it is nil.
(thumbs-modify-image): Do not pass "" as 'arg' to
'thumbs-call-convert' (bug#56375).

Some time in the past this was converted from using the shell to
passing the parameters directly, but the fallout was not handled
correctly.

2 years agoPreserve <title> in the Emacs manuals
Lars Ingebrigtsen [Mon, 4 Jul 2022 10:47:16 +0000 (12:47 +0200)]
Preserve <title> in the Emacs manuals

* admin/admin.el (manual-html-fix-headers): Preserve the <title>
element (bug#48334).

2 years agoDon't bug out in manual-html-fix-index-2 on newer makeinfo versions
Lars Ingebrigtsen [Mon, 4 Jul 2022 10:37:17 +0000 (12:37 +0200)]
Don't bug out in manual-html-fix-index-2 on newer makeinfo versions

* admin/admin.el (manual-html-fix-index-2): Don't bug out if the
makeinfo version doesn't include <ul>.

2 years agoExclude radio buttons when suggesting URI in eww
Visuwesh [Sun, 3 Jul 2022 13:29:44 +0000 (15:29 +0200)]
Exclude radio buttons when suggesting URI in eww

* lisp/net/eww.el (eww-links-at-point): Exclude radio links.
(bug#56366).

2 years agoNew command help-fns-edit-mode-cancel
Stefan Kangas [Mon, 4 Jul 2022 10:12:45 +0000 (12:12 +0200)]
New command help-fns-edit-mode-cancel

* lisp/help-fns.el (help-fns-edit-mode-cancel): New command.
(help-fns--edit-value-mode-map): Bind it to 'C-c C-k'.
(help-fns-edit-variable): Advertise it in help text.

2 years agoHandle errors caused by ignoring errors with GDK's trap installed
Po Lu [Mon, 4 Jul 2022 06:02:42 +0000 (14:02 +0800)]
Handle errors caused by ignoring errors with GDK's trap installed

* src/xterm.c (x_ignore_errors_for_next_request)
(x_stop_ignoring_errors): Also tell GDK to ignore errors from
the following requests.  (bug#56372)

2 years agoAlways wait for XdndStatus before sending XdndDrop
Po Lu [Mon, 4 Jul 2022 05:41:20 +0000 (13:41 +0800)]
Always wait for XdndStatus before sending XdndDrop

* src/xterm.c (x_dnd_do_drop): New function.
(x_dnd_begin_drag_and_drop): Clear new flag.
(handle_one_xevent): Use that function; send drops upon receipt
of pending XdndStatus, to avoid race conditions where we don't
yet know the selected action.

2 years agoFix accessing dpyinfo after it is deallocated
Po Lu [Mon, 4 Jul 2022 04:56:24 +0000 (12:56 +0800)]
Fix accessing dpyinfo after it is deallocated

* src/xterm.c (x_connection_closed): Print disconnect error for
the last terminal before freeing it.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Mon, 4 Jul 2022 04:30:34 +0000 (06:30 +0200)]
Merge from origin/emacs-28

41472f3b6c Document 'jit-lock-debug-mode'

2 years agoDisplay list of traps and handlers when crashing due to an X error
Po Lu [Mon, 4 Jul 2022 03:32:05 +0000 (11:32 +0800)]
Display list of traps and handlers when crashing due to an X error

* src/xterm.c (x_connection_closed): Print list of installed
error handlers if not crashing due to an IO error.
(NO_INLINE): Include error serial in error message.

2 years agoAdd support for fullscreen values fullheight and fullwidth on PGTK
Florian Rommel [Fri, 3 Jun 2022 01:03:03 +0000 (03:03 +0200)]
Add support for fullscreen values fullheight and fullwidth on PGTK

* src/pgtkterm.c (window_state_event): Support values fullheight and
fullwidth for the fullscreen frame-parameter
* doc/lispref/frames.texi (Size Parameters): Document inability to
actively set hullheight/fullwidth for PGTK frames
* configure.ac: Bump GTK version for PGTK
* etc/NEWS: Change GTK version in PGTK announcement

2 years agoAdd some more error checking code to `x_stop_ignoring_errors'
Po Lu [Mon, 4 Jul 2022 01:33:19 +0000 (09:33 +0800)]
Add some more error checking code to `x_stop_ignoring_errors'

* src/xterm.c (x_stop_ignoring_errors): Abort if no request was
actually made, making the state inconsistent.

2 years agoSimplify lisp-el-font-lock-keywords-2 definition slightly
Stefan Kangas [Sun, 3 Jul 2022 21:05:50 +0000 (23:05 +0200)]
Simplify lisp-el-font-lock-keywords-2 definition slightly

* lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2):
Simplify slightly.

2 years agoQuote some literal keys to get help-key-binding face
Stefan Kangas [Sun, 3 Jul 2022 15:35:53 +0000 (17:35 +0200)]
Quote some literal keys to get help-key-binding face

* lisp/align.el (align):
* lisp/bindings.el (undo-repeat-map):
* lisp/calc/calc-embed.el (calc-do-embedded):
* lisp/calc/calc-prog.el (calc-user-define-invocation):
* lisp/calc/calc-yank.el (calc--edit-mode):
* lisp/comint.el (comint-history-isearch)
* lisp/dired.el (dired-mode):
* lisp/emulation/viper.el (viper-mode):
* lisp/erc/erc-button.el (erc-button-face):
* lisp/erc/erc-track.el (erc-track-enable-keybindings):
* lisp/gnus/gnus-art.el (gnus-article-button-face):
* lisp/gnus/gnus-eform.el (gnus-edit-form):
* lisp/gnus/gnus-sum.el (gnus-summary-stop-at-end-of-message)
(gnus-summary-goto-unread):
* lisp/icomplete.el (icomplete-show-matches-on-no-input):
* lisp/image-mode.el (image-scroll-up):
* lisp/international/iso-transl.el (iso-transl-set-language):
* lisp/isearch.el (isearch-forward-regexp):
* lisp/misc.el (butterfly):
* lisp/outline.el (outline-minor-mode-cycle-filter)
(outline-minor-mode-cycle):
* lisp/progmodes/grep.el (rgrep):
* lisp/progmodes/gud.el (gud-gdb-repeat-map, gud-sdb-repeat-map)
(gud-dbx-repeat-map, gud-xdb-repeat-map, gud-perldb-repeat-map)
(gud-pdb-repeat-map, gud-guiler-repeat-map, gud-jdb-repeat-map):
* lisp/progmodes/idlw-shell.el (idlwave-shell-graphics-window-size)
(idlwave-shell-mode):
* lisp/progmodes/idlwave.el (idlwave-shell-debug-modifiers)
(idlwave-list-shell-load-path-shadows):
* lisp/progmodes/python.el (python-shell-get-process-or-error):
* lisp/repeat.el (repeat-check-key):
* lisp/replace.el (query-replace, query-replace-regexp)
(read-regexp):
* lisp/simple.el (read-extended-command-predicate):
* lisp/tab-bar.el (tab-bar-switch-repeat-map)
(tab-bar-move-repeat-map):
* lisp/term.el (ansi-term):
* lisp/textmodes/reftex-index.el (reftex-index-phrases-set-macro-key):
* lisp/vc/emerge.el (emerge-scroll-left, emerge-scroll-right):
* lisp/windmove.el:
* lisp/winner.el (winner-mode): Quote literal keys to get
'help-key-binding' face.
* lisp/comint.el (comint-insert-previous-argument): Use regular
quotes.

2 years agoUse command substitutions instead of literal keys in some places
Stefan Kangas [Sun, 3 Jul 2022 19:00:16 +0000 (21:00 +0200)]
Use command substitutions instead of literal keys in some places

* lisp/emulation/viper-macs.el (ex-map, viper-set-register-macro):
* lisp/minibuffer.el (minibuffer-beginning-of-buffer-movement):
* lisp/speedbar.el (speedbar-frame-mode):
* lisp/subr.el (kbd):
* lisp/textmodes/page-ext.el (pages-directory)
(pages-directory-for-addresses):
* lisp/textmodes/reftex-toc.el: Use command substitutions instead of
literal keys.

2 years agoNormalize definition of erc-track-minor-mode-map
Stefan Kangas [Sun, 3 Jul 2022 20:42:13 +0000 (22:42 +0200)]
Normalize definition of erc-track-minor-mode-map

* lisp/erc/erc-track.el (erc-track-minor-mode-map): Normalize keymap
definition.

2 years agoUse substitute-command-keys in reftex-toc-show-help
Stefan Kangas [Sun, 3 Jul 2022 20:32:47 +0000 (22:32 +0200)]
Use substitute-command-keys in reftex-toc-show-help

* lisp/textmodes/reftex-toc.el (reftex-toc-help)
(reftex-toc-show-help): Use substitute-command-keys.

2 years agoFont lock \\<> and \\{} command substitutions in docstrings
Stefan Kangas [Sun, 3 Jul 2022 18:59:00 +0000 (20:59 +0200)]
Font lock \\<> and \\{} command substitutions in docstrings

* lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2):
Support \\<> and \\{} command substitutions.

2 years agoFix warning in last commit
Stefan Kangas [Sun, 3 Jul 2022 21:28:50 +0000 (23:28 +0200)]
Fix warning in last commit

* lisp/calc/calc-misc.el (calc-dispatch-help): Fix warning.

2 years ago; * lisp/mwheel.el (mouse-wheel-scroll-amount): Doc fix.
Eli Zaretskii [Sun, 3 Jul 2022 17:57:22 +0000 (20:57 +0300)]
; * lisp/mwheel.el (mouse-wheel-scroll-amount): Doc fix.

2 years agoUse more help-key-binding faces in repeat-mode message
Juri Linkov [Sun, 3 Jul 2022 17:02:02 +0000 (20:02 +0300)]
Use more help-key-binding faces in repeat-mode message

* lisp/repeat.el (repeat-echo-message-string): Use
substitute-command-keys for repeat-exit-key as well.

2 years ago* lisp/mwheel.el: More fixes for global-text-scale (bug#48307)
Juri Linkov [Sun, 3 Jul 2022 17:00:11 +0000 (20:00 +0300)]
* lisp/mwheel.el: More fixes for global-text-scale (bug#48307)

(mouse-wheel-global-text-scale): Move down closer to mouse-wheel-text-scale.
(mouse-wheel-scroll-amount): Add :value global-text-scale and mention it
in the docstring.
(mouse-wheel-global-text-scale, mouse-wheel--setup-bindings):
Add mouse-wheel-down-alternate-event and mouse-wheel-up-alternate-event.
Allow a list of modifiers for 'text-scale'.

2 years agoImprove calc-dispatch-help docstring
Stefan Kangas [Sun, 3 Jul 2022 15:31:45 +0000 (17:31 +0200)]
Improve calc-dispatch-help docstring

* lisp/calc/calc-misc.el (calc-dispatch-help): Use command
substitutions.

2 years agoTramp code cleanup
Michael Albinus [Sun, 3 Jul 2022 16:23:55 +0000 (18:23 +0200)]
Tramp code cleanup

* lisp/net/tramp-cache.el (tramp-get-file-property)
(tramp-get-connection-property): Make DEFAULT optional.  Adapt callees.

* lisp/net/tramp.el:
* lisp/net/tramp-adb.el:
* lisp/net/tramp-cmds.el:
* lisp/net/tramp-compat.el:
* lisp/net/tramp-crypt.el:
* lisp/net/tramp-ftp.el:
* lisp/net/tramp-fuse.el:
* lisp/net/tramp-gvfs.el:
* lisp/net/tramp-integration.el:
* lisp/net/tramp-sh.el:
* lisp/net/tramp-smb.el:
* lisp/net/tramp-sshfs.el:
* lisp/net/trampver.el: Code cleanup.

* test/lisp/net/tramp-tests.el (tramp--test-sh-no-ls--dired-p)
(tramp--test-with-proper-process-name-and-buffer): Code cleanup.

2 years agoabort-redisplay: Add missing unbind_to in 'recenter'
Florian Rommel [Sun, 3 Jul 2022 15:04:32 +0000 (17:04 +0200)]
abort-redisplay: Add missing unbind_to in 'recenter'

* src/window.c (recenter): Add ubind_to before early return.
(Bug#56369)

2 years agolisp/elec-pair.el: Simplify last change
Stefan Monnier [Sun, 3 Jul 2022 15:12:45 +0000 (11:12 -0400)]
lisp/elec-pair.el: Simplify last change

* lisp/elec-pair.el (electric-pair--with-syntax):
Rename from `electric-pair--with-text-syntax`.
Make `start` mandatory.  Run `body` in the normal syntax if `start` is nil.
(electric-pair--with-syntax-1): New function, extracted from
`electric-pair--with-text-syntax`.
(electric-pair-syntax-info, electric-pair--balance-info):
Adjust calls accordingly.

2 years agoFix dired-goto-subdir prompt
Stefan Kangas [Sun, 3 Jul 2022 13:16:23 +0000 (15:16 +0200)]
Fix dired-goto-subdir prompt

* lisp/dired-aux.el (dired-goto-subdir): Fix prompt and improve
docstring.  Add interactive mode tag for dired-mode.

2 years agoFix warnings in my last commit
Stefan Kangas [Sun, 3 Jul 2022 12:47:53 +0000 (14:47 +0200)]
Fix warnings in my last commit

* lisp/textmodes/emacs-news-mode.el (outline): Require.

2 years agoImprove navigation keybindings in emacs-news-mode
Stefan Kangas [Sun, 3 Jul 2022 12:40:21 +0000 (14:40 +0200)]
Improve navigation keybindings in emacs-news-mode

* lisp/textmodes/emacs-news-mode.el (emacs-news-common-map): New
defvar-keymap.  Bind navigation commands as in 'org-mode' and
'outline-minor-mode'.
(emacs-news-mode-map): Inherit from 'emacs-news-common-map'.
(emacs-news-view-mode-map): New defvar-keymap; inherit from
'emacs-news-common-map'.

2 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Sun, 3 Jul 2022 12:39:05 +0000 (15:39 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

2 years agoFix implementation of 'reset' face values
Eli Zaretskii [Sun, 3 Jul 2022 12:37:50 +0000 (15:37 +0300)]
Fix implementation of 'reset' face values

* src/xfaces.c (Finternal_merge_in_global_face)
(gui_supports_face_attributes_p):  Only modify local copy of face
attributes when replacing 'reset' pseudo-values with real values.
(Bug#38771)

2 years ago; * etc/NEWS: Tag two items.
Stefan Kangas [Sun, 3 Jul 2022 12:34:44 +0000 (14:34 +0200)]
; * etc/NEWS: Tag two items.

2 years agoMove dired-clean-up-buffers-too to dired.el
Stefan Kangas [Sun, 3 Jul 2022 12:32:44 +0000 (14:32 +0200)]
Move dired-clean-up-buffers-too to dired.el

* lisp/dired-x.el (dired-clean-up-buffers-too)
(dired-clean-confirm-killing-deleted-buffers): Move from here...
* lisp/dired.el (dired-clean-up-buffers-too)
(dired-clean-confirm-killing-deleted-buffers): ...to
here.  (Bug#21981)
(dired-clean-up-after-deletion): Adjust documentation.
* etc/NEWS: Announce the change.

2 years agoFix `python-nav-beginning-of-defun' line continuation using backslash
kobarity [Sun, 3 Jul 2022 12:22:13 +0000 (14:22 +0200)]
Fix `python-nav-beginning-of-defun' line continuation using backslash

* lisp/progmodes/python.el (python-nav--beginning-of-defun): Allow
line continuation using backslash in defuns (bug#55702).
(python-info-looking-at-beginning-of-defun): Add CHECK-STATEMENT
argument.

2 years ago* lisp/dired-x.el (dired-omit-size-limit): Increase value.
Stefan Kangas [Sun, 3 Jul 2022 12:20:34 +0000 (14:20 +0200)]
* lisp/dired-x.el (dired-omit-size-limit): Increase value.

2 years agoMake string-limit with encoding return complete glyphs
Lars Ingebrigtsen [Sun, 3 Jul 2022 12:05:01 +0000 (14:05 +0200)]
Make string-limit with encoding return complete glyphs

* lisp/emacs-lisp/subr-x.el (string-limit): Return more correct
results in the CODING-SYSTEM case for coding systems with BOM and
charset designations (bug#48324).  Also amend the algorithm to
return complete glyphs, not just complete code points.

2 years agoImprove performance when rejecting XI touch event
Po Lu [Sun, 3 Jul 2022 11:48:55 +0000 (19:48 +0800)]
Improve performance when rejecting XI touch event

* src/xterm.c (handle_one_xevent): Avoid sync handling simple
error.

2 years agoFix streaming problems in nnimap-retrieve-headers
Lars Ingebrigtsen [Sun, 3 Jul 2022 10:57:29 +0000 (12:57 +0200)]
Fix streaming problems in nnimap-retrieve-headers

* lisp/gnus/nnimap.el (nnimap-retrieve-headers): Don't stream the
UID FETCH commands, since the server may return the results
out-of-order (bug#56332).

2 years agoAdd new function `seq-split'
Lars Ingebrigtsen [Sun, 3 Jul 2022 10:55:00 +0000 (12:55 +0200)]
Add new function `seq-split'

* doc/lispref/sequences.texi (Sequence Functions): Document it.

* lisp/emacs-lisp/seq.el (seq-split): New function.

* lisp/emacs-lisp/shortdoc.el (sequence): Mention it.

2 years agoelec-pair: Fix bug incorrectly hiding syntax-propertize-function
Allen Li [Sun, 3 Jul 2022 10:31:15 +0000 (12:31 +0200)]
elec-pair: Fix bug incorrectly hiding syntax-propertize-function

* lisp/elec-pair.el (electric-pair--with-text-syntax): New macro.
(electric-pair-syntax-info):
(electric-pair--balance-info):
(electric-pair--syntax-ppss, electric-pair--balance-info): Use it.
(electric-pair--with-uncached-syntax): Remove (bug#49629).

The main bug that this is fixing is `syntax-propertize-function' being
hidden in `electric-pair--balance-info' when the original syntax table
is to be used, not `electric-pair-text-syntax-table'.

Notably, this causes `electric-pair-mode' to often misbehave in HTML
files when pairing angle brackets.

This commit also flushes the cache before installing
`electric-pair-text-syntax-table', to prevent cached syntax for the
original table from affecting things.

2 years ago; * src/xfaces.c (Finternal_set_lisp_face_attribute): Fix last change.
Eli Zaretskii [Sun, 3 Jul 2022 10:22:42 +0000 (13:22 +0300)]
; * src/xfaces.c (Finternal_set_lisp_face_attribute): Fix last change.

2 years agoImprove efficiency of `x_frame_highlight' and `x_frame_unhighlight'
Po Lu [Sun, 3 Jul 2022 09:51:55 +0000 (17:51 +0800)]
Improve efficiency of `x_frame_highlight' and `x_frame_unhighlight'

* src/xterm.c (x_frame_highlight, x_frame_unhighlight): Don't
sync catching errors.

2 years ago* lisp/dired.el (dired-do-eww): New command.
Stefan Kangas [Sun, 3 Jul 2022 09:44:04 +0000 (11:44 +0200)]
* lisp/dired.el (dired-do-eww): New command.

2 years agoImprove dired-do-{info,man} error handling
Stefan Kangas [Sat, 2 Jul 2022 20:17:06 +0000 (22:17 +0200)]
Improve dired-do-{info,man} error handling

* lisp/dired.el (dired-do-man, dired-do-info): Use
'dired-get-file-for-visit' to get better error handling.
Interactive mode tagging.

2 years agoImplement pseudo-value 'reset' of face attrributes
Eli Zaretskii [Sun, 3 Jul 2022 09:30:24 +0000 (12:30 +0300)]
Implement pseudo-value 'reset' of face attrributes

* doc/lispref/display.texi (Face Attributes):
* etc/NEWS: Document the new pseudo-value 'reset'.

* src/xfaces.c (realize_named_face, lookup_derived_face)
(gui_supports_face_attributes_p, lookup_named_face)
(Finternal_merge_in_global_face, merge_named_face, merge_faces):
Handle the 'reset' pseudo-value of a face's attribute.
(syms_of_xfaces): New symbol 'reset'.
(RESET_P): New macro.
(check_lface_attrs, Finternal_set_lisp_face_attribute): Allow
'reset' as a value of any attribute except ':inherit'.
(Bug#38771)

2 years ago* lisp/leim/quail/indian.el ("malayalam-mozhi"): Set DETERMINISTIC.
James Thomas [Sat, 2 Jul 2022 09:23:54 +0000 (14:53 +0530)]
* lisp/leim/quail/indian.el ("malayalam-mozhi"): Set DETERMINISTIC.

2 years agoFix deadlocks with very old versions of libXi
Po Lu [Sun, 3 Jul 2022 06:33:02 +0000 (14:33 +0800)]
Fix deadlocks with very old versions of libXi

* src/xfns.c (setup_xi_event_mask, Fx_create_frame): Set
`xi_mask' ourselves if the version of libXi is too old to have
working XIGetSelectedEvents.
* src/xterm.c (x_destroy_window): Free `xi_mask' with xfree in
that case.

2 years agoDocument 'jit-lock-debug-mode'
Eli Zaretskii [Sun, 3 Jul 2022 05:40:54 +0000 (08:40 +0300)]
Document 'jit-lock-debug-mode'

* doc/lispref/modes.texi (Other Font Lock Variables): Document
'jit-lock-debug-mode'.

2 years ago; Merge from origin/emacs-28
Stefan Kangas [Sun, 3 Jul 2022 04:30:39 +0000 (06:30 +0200)]
; Merge from origin/emacs-28

The following commit was skipped:

d927181b1a * lisp/progmodes/cc-mode.el (c-common-init): Bind case-fol...

2 years agoMerge from origin/emacs-28
Stefan Kangas [Sun, 3 Jul 2022 04:30:38 +0000 (06:30 +0200)]
Merge from origin/emacs-28

dc3d01a5af CC Mode: Fix a c-backward-token-2 call wrongly jumping bac...
e390396e68 Doc fixes; don't use obsolete names
c85f7c2e8a Don't refer to obsolete alias for insert-char
60ad45c5d2 Don't use obsolete face name in manoj-dark-theme

2 years agoSpeed up receiving drops over slow connections
Po Lu [Sun, 3 Jul 2022 01:41:32 +0000 (09:41 +0800)]
Speed up receiving drops over slow connections

* lisp/x-dnd.el (x-dnd-debug-errors): New variable.
(x-dnd-handle-drag-n-drop-event): Bind
`x-fast-protocol-requests' to t if that is off.

* src/xfns.c (Fx_change_window_property):
(Fx_delete_window_property):
* src/xselect.c (Fx_send_client_message, x_send_client_event):
Don't sync to check for errors if fast protocol requests are
enabled.

* src/xterm.c (x_catch_errors_for_lisp, x_check_errors_for_lisp)
(x_uncatch_errors_for_lisp): New functions.
(syms_of_xterm): New variable `x-fast-protocol-requests'.
* src/xterm.h: Update prototypes.

2 years agoREQUIRE-MATCH doc string clarification
Lars Ingebrigtsen [Sat, 2 Jul 2022 20:03:06 +0000 (22:03 +0200)]
REQUIRE-MATCH doc string clarification

* src/minibuf.c (Fcompleting_read):
* lisp/minibuffer.el (read-file-name): Clarify what the return
value is in the REQUIRE-MATCH function case.

2 years agoFix some typos in NEWS
Lars Ingebrigtsen [Sat, 2 Jul 2022 17:45:27 +0000 (19:45 +0200)]
Fix some typos in NEWS

2 years agoAdd sanity check for Emacsen distributed without .el files
Lars Ingebrigtsen [Sat, 2 Jul 2022 16:42:11 +0000 (18:42 +0200)]
Add sanity check for Emacsen distributed without .el files

* src/lread.c (maybe_swap_for_eln): Add sanity check for Emacsen
distributed without .el files (bug#48342).

2 years ago* lisp/progmodes/cc-mode.el (c-common-init): Bind case-fold-search to nil
Alan Mackenzie [Mon, 31 Jan 2022 17:44:59 +0000 (17:44 +0000)]
* lisp/progmodes/cc-mode.el (c-common-init): Bind case-fold-search to nil

Backport:  This fixes bug #53605.

2 years agoCC Mode: Fix a c-backward-token-2 call wrongly jumping back over macros.
Alan Mackenzie [Sat, 2 Jul 2022 16:12:59 +0000 (16:12 +0000)]
CC Mode: Fix a c-backward-token-2 call wrongly jumping back over macros.

This fixes bug #56256.

* lisp/progmodes/cc-fonts.el (c-font-lock-c++-lambda-captures): Replace a
c-backward-token-2, which could jump back too far leading to an infinite
loop, with a save-excursion to remember the point we've got to go back to.

2 years agoFilter out nul bytes when killing from a *grep* buffer
Lars Ingebrigtsen [Sat, 2 Jul 2022 15:58:56 +0000 (17:58 +0200)]
Filter out nul bytes when killing from a *grep* buffer

* lisp/progmodes/grep.el (grep-mode): Filter out the nul bytes
(bug#48321).

2 years agoAdd more separators to longlines-mode
Manuel Giraud [Sat, 2 Jul 2022 15:38:36 +0000 (17:38 +0200)]
Add more separators to longlines-mode

* lisp/obsolete/longlines.el (longlines-breakpoint-chars): New
custom to have multiple breakpoint chars.
(longlines-set-breakpoint): Add a target-column parameter and use
`longlines-breakpoint-chars'.
(longlines-find-break-backward, longlines-find-break-foreward):
Use `longlines-breakpoint-chars'.
(longlines-wrap-line): Do not insert space upon merging, just
remove the soft newline. Fix "space before tab" in indent.
(longlines-merge-lines-p): Use the new target-column parameter to
find out if the next line could be merged with the current one.
(longlines-encode-region): Do not replace a soft newline with a
space, just remove it.
* etc/NEWS: New user option 'longlines-breakpoint-chars'

2 years agoUnobsolete longlines-mode (bug#18589)
Lars Ingebrigtsen [Sat, 2 Jul 2022 15:33:33 +0000 (17:33 +0200)]
Unobsolete longlines-mode (bug#18589)

2 years agoUse help-key-binding face in text scale adjust messages
Stefan Kangas [Sat, 2 Jul 2022 15:32:14 +0000 (17:32 +0200)]
Use help-key-binding face in text scale adjust messages

* lisp/face-remap.el (text-scale-adjust)
(global-text-scale-adjust): Use substitute-command-keys.

2 years agoUse help-key-binding face in repeat-mode message
Stefan Kangas [Sat, 2 Jul 2022 14:59:14 +0000 (16:59 +0200)]
Use help-key-binding face in repeat-mode message

* lisp/repeat.el (repeat-echo-message-string): Use
substitute-command-keys.

2 years agoMake dired-jump repeatable in repeat-mode
Stefan Kangas [Sat, 2 Jul 2022 14:56:39 +0000 (16:56 +0200)]
Make dired-jump repeatable in repeat-mode

* lisp/dired.el (dired-jump-map): New variable.
(dired-jump): Put 'repeat-map' property with 'dired-jump-map'.

2 years ago; * etc/NEWS: Fix typo in recently-added entry.
Eli Zaretskii [Sat, 2 Jul 2022 14:56:05 +0000 (17:56 +0300)]
; * etc/NEWS: Fix typo in recently-added entry.

2 years ago; Minor fixes for 'global-text-scale-adjust'
Eli Zaretskii [Sat, 2 Jul 2022 14:52:23 +0000 (17:52 +0300)]
; Minor fixes for 'global-text-scale-adjust'

* doc/emacs/display.texi (Text Scale): Improve indexing.

* lisp/mwheel.el (mouse-wheel-global-text-scale): Doc fix.
* lisp/face-remap.el (global-text-scale-adjust-resizes-frames):
Fix a typo.
(global-text-scale-adjust-limits): Doc fix.
(Bug#48307)

2 years agoMove dired-info and dired-man from dired-x to dired
Stefan Kangas [Sat, 2 Jul 2022 13:41:43 +0000 (15:41 +0200)]
Move dired-info and dired-man from dired-x to dired

* lisp/dired-x.el (dired-bind-man, dired-bind-info): Change into
defvars and make obsolete.
(dired-extra-startup): Doc fix.
(dired-info, dired-man): Move from here...
* lisp/dired.el (dired-do-info, dired-do-man): ...to here and
rename.  (Bug#21981)

* lisp/dired.el (dired-mode-map): Bind 'I' and 'N' to 'dired-do-info'
and 'dired-do-man'.

* doc/misc/dired-x.texi (Miscellaneous Commands): Remove documentation
of 'dired-info' and 'dired-man'.
* doc/emacs/dired.texi (Dired Enter): Document 'dired-do-info' and
'dired-do-man'.
* etc/NEWS: Announce the above changes.

2 years agoPrefer defvar-keymap in nxml/*.el
Stefan Kangas [Sat, 2 Jul 2022 10:25:03 +0000 (12:25 +0200)]
Prefer defvar-keymap in nxml/*.el

* lisp/nxml/nxml-mode.el (nxml-mode-map):
* lisp/nxml/nxml-outln.el (nxml-outline-prefix-map)
(nxml-outline-show-map, nxml-outline-hiding-tag-map)
(nxml-outline-showing-tag-map): Prefer defvar-keymap.

2 years agoFix error handling for XCB Xlib
Po Lu [Sat, 2 Jul 2022 13:55:22 +0000 (21:55 +0800)]
Fix error handling for XCB Xlib

* src/xterm.c (xm_send_drop_message)
(xm_send_top_level_enter_message, xm_send_drag_motion_message)
(xm_send_top_level_leave_message, x_dnd_compute_toplevels)
(x_dnd_send_enter, x_dnd_send_position, x_dnd_send_leave)
(x_dnd_send_drop, handle_one_xevent, x_catch_errors_with_handler)
(x_request_can_fail, x_clean_failable_requests)
(x_ignore_errors_for_next_request, x_stop_ignoring_errors)
(x_uncatch_errors, x_check_errors, x_had_errors_p, x_error_handler)
(frame_set_mouse_pixel_position, x_focus_frame): Record serial
sequences instead of simply the next request when ignoring a
single request.  Use XNextRequest instead of NextRequest, since
the latter is unreliable when using Xlib built with XCB.

* src/xterm.h (struct x_failable_request): New struct..
(struct x_display_info): Make failable request variables the
right type.

2 years agoFix display disconnect when tooltip frame is alive
Po Lu [Sat, 2 Jul 2022 13:21:33 +0000 (21:21 +0800)]
Fix display disconnect when tooltip frame is alive

* src/xterm.c (x_connection_closed): Don't dereference nil when
loop finds a tooltip frame.

2 years agoCommand for global adjustments to the default face
Gregory Heytings [Sat, 2 Jul 2022 13:40:45 +0000 (15:40 +0200)]
Command for global adjustments to the default face

* lisp/face-remap.el (global-text-scale-adjust): New command.
(text-scale-adjust): Refer to the new related command.
(global-text-scale-adjust-resizes-frames): New user option.

* lisp/mwheel.el (mouse-wheel-scroll-amount): Add the new command
to the mouse wheel scrolling events.
(mouse-wheel-global-text-scale): New function.
(mouse-wheel-mode): Use the new function with mouse-wheel-mode.

* doc/emacs/display.texi (Text Scale): Document the new command and
the new user option.

* etc/NEWS: Mention the new command and its bindings, and the new
user option.

2 years agoAdd a comment about buffer_local_value/find_symbol_value
Lars Ingebrigtsen [Sat, 2 Jul 2022 13:22:13 +0000 (15:22 +0200)]
Add a comment about buffer_local_value/find_symbol_value

* src/data.c: Note that buffer_local_value is very similar
(bug#48281).

2 years agoAllow NUL characters in JSON input
Lars Ingebrigtsen [Sat, 2 Jul 2022 13:06:24 +0000 (15:06 +0200)]
Allow NUL characters in JSON input

* src/json.c (Fjson_parse_string, Fjson_parse_buffer): Allow NUL
characters in JSON (bug#48274).

2 years agoMake comint-watch-for-password-prompt more resilient
Lars Ingebrigtsen [Sat, 2 Jul 2022 12:21:00 +0000 (14:21 +0200)]
Make comint-watch-for-password-prompt more resilient

* lisp/comint.el (comint-watch-for-password-prompt): Don't try to
send commands to the process after it's exited (bug#56336).  (This
commonly happens when invoked via `M-&'.)

2 years ago; Fix typos.
Mattias Engdegård [Sat, 2 Jul 2022 10:01:18 +0000 (12:01 +0200)]
; Fix typos.

2 years agoPreserve connection-local settings in dired
Michael Albinus [Sat, 2 Jul 2022 11:19:04 +0000 (13:19 +0200)]
Preserve connection-local settings in dired

* lisp/dired-aux.el (dired-shell-command):
Preserve connection-local settings.  (Bug#56333)

2 years agoAdd native-compile-prune-cache command
Lars Ingebrigtsen [Sat, 2 Jul 2022 10:59:41 +0000 (12:59 +0200)]
Add native-compile-prune-cache command

* lisp/emacs-lisp/comp.el (native-compile-prune-cache): New
command (bug#48108).

2 years agonative-comp-eln-load-path doc string fix
Lars Ingebrigtsen [Sat, 2 Jul 2022 10:54:14 +0000 (12:54 +0200)]
native-comp-eln-load-path doc string fix

* src/comp.c (syms_of_comp): Fix grammar in doc string.

2 years agoDoc fixes; don't use obsolete names
Stefan Kangas [Sat, 2 Jul 2022 08:38:57 +0000 (10:38 +0200)]
Doc fixes; don't use obsolete names

* etc/compilation.txt:
* lisp/mh-e/mh-funcs.el (mh-kill-folder): Don't use obsolete
names.

2 years agoDon't refer to obsolete alias for insert-char
Stefan Kangas [Sat, 2 Jul 2022 09:36:50 +0000 (11:36 +0200)]
Don't refer to obsolete alias for insert-char

* lisp/leim/quail/persian.el: Don't refer to obsolete alias for
insert-char.

2 years agoDon't use obsolete face name in manoj-dark-theme
Stefan Kangas [Sat, 2 Jul 2022 08:58:45 +0000 (10:58 +0200)]
Don't use obsolete face name in manoj-dark-theme

* etc/themes/manoj-dark-theme.el (change-log-acknowledgment): Don't
use obsolete/non-existent face name.

2 years ago* src/sheap.h (STATIC_HEAP_SIZE): Double the size of static heap.
Eli Zaretskii [Sat, 2 Jul 2022 09:16:33 +0000 (12:16 +0300)]
* src/sheap.h (STATIC_HEAP_SIZE): Double the size of static heap.