Evan Klitzke [Wed, 14 Sep 2022 12:32:29 +0000 (14:32 +0200)]
Add consteval and constinit keywords to cc-mode
* lisp/progmodes/cc-langs.el (c-modifier-kwds): Add consteval and
constinit keywords (introduced in C++20) (bug#51092).
Copyright-paperwork-exempt: yes
Basil L. Contovounesios [Wed, 14 Sep 2022 10:51:41 +0000 (13:51 +0300)]
Fix more misleading cl-case quoting in tests
* test/lisp/dnd-tests.el (x-begin-drag):
* test/lisp/so-long-tests/so-long-tests-helpers.el
(so-long-tests-assert-active, so-long-tests-assert-reverted): Remove
misleading quoting in cl-case clauses (bug#51368).
Stefan Kangas [Wed, 14 Sep 2022 10:12:46 +0000 (12:12 +0200)]
Make it easier to customize wallpaper command
* lisp/image/wallpaper.el
(wallpaper--default-commands): New defvar.
(wallpaper--find-command): Use above new defvar.
(wallpaper--find-command-arguments): New defun.
(wallpaper-command): Rename from 'wallpaper-commands' and change
type to string. Use 'wallpaper--find-command' to set it.
(wallpaper-command-args): New defcustom. Use
'wallpaper--find-command-arguments' to set it.
(wallpaper--set-wallpaper-command): New defun. Use as :set property
for 'wallpaper-command'.
(wallpaper-set): Use above new defcustoms to set the wallpaper.
Suggested by Eli Zaretskii <eliz@gnu.org>.
Stefan Kangas [Wed, 14 Sep 2022 09:10:10 +0000 (11:10 +0200)]
Improve wallpaper.el docs for recent changes
* lisp/image/wallpaper.el: Fix documentation to better reflect that no
external command is needed on Haiku.
* etc/NEWS: Update entry on wallpaper.el.
Stefan Kangas [Wed, 14 Sep 2022 08:52:39 +0000 (10:52 +0200)]
Allow setting wallpaper from TTY
* lisp/image/wallpaper.el (wallpaper-set): Allow setting wallpaper
when 'display-graphic-p' is nil.
(wallpaper-default-width, wallpaper-default-height):
New variables.
(wallpaper--get-height-or-width): New helper function.
Stefan Kangas [Wed, 14 Sep 2022 08:41:07 +0000 (10:41 +0200)]
* lisp/image/wallpaper.el (wallpaper-commands): Add xwallpaper.
Stefan Kangas [Wed, 14 Sep 2022 08:29:16 +0000 (10:29 +0200)]
Support recent KDE Plasma in wallpaper.el
* lisp/image/wallpaper.el (wallpaper-commands): Support recent KDE
Plasma.
(wallpaper--check-command): New cl-defmethod.
Stefan Kangas [Wed, 14 Sep 2022 08:26:07 +0000 (10:26 +0200)]
Fix desktop environment check on Ubuntu
* lisp/image/wallpaper.el (xdg): Require.
(wallpaper--check-command): Use xdg-current-desktop instead of reading
XDG_CURRENT_DESKTOP directly. This fixes things on e.g. Ubuntu, where
XDG_CURRENT_DESKTOP might contain a string like "ubuntu:GNOME".
Stefan Kangas [Wed, 14 Sep 2022 08:15:08 +0000 (10:15 +0200)]
; * etc/NEWS: Improve wording of 'xdg-state-home' entry.
Stefan Kangas [Wed, 14 Sep 2022 08:15:26 +0000 (10:15 +0200)]
Add new function xdg-current-desktop to xdg.el
* lisp/xdg.el (xdg-current-desktop): New function.
* test/lisp/xdg-tests.el (xdg-current-desktop): New test.
Stefan Kangas [Wed, 14 Sep 2022 06:45:45 +0000 (08:45 +0200)]
Improve messages in image-crop.el
* lisp/image/image-crop.el (image-crop)
(image-crop--crop-image-1): Improve messages and include the name
of the current operation.
Po Lu [Wed, 14 Sep 2022 06:24:49 +0000 (06:24 +0000)]
Implement wallpaper.el support for Haiku
* lisp/image/wallpaper.el (haiku-set-wallpaper, wallpaper-set):
Use `haiku-set-wallpaper' on Haiku.
* lisp/term/haiku-win.el (haiku-write-node-attribute)
(haiku-send-message, haiku-set-wallpaper): New function.
* src/haiku_support.cc (be_write_node_message, be_send_message):
New functions.
* src/haiku_support.h: Update prototypes.
* src/haikuselect.c (haiku_message_to_lisp)
(haiku_lisp_to_message): Fix CSTR type handling to include NULL
byte.
(haiku_report_system_error, Fhaiku_write_node_attribute)
(Fhaiku_send_message): New functions.
(syms_of_haikuselect): Add defsubrs.
Stefan Kangas [Wed, 14 Sep 2022 02:44:12 +0000 (04:44 +0200)]
Support wbg in wallpaper.el (Bug#57781)
* lisp/image/wallpaper.el (wallpaper-commands): Add "wbg".
(wallpaper--check-command): New cl-defmethod for "wbg".
Stefan Kangas [Tue, 13 Sep 2022 16:54:14 +0000 (18:54 +0200)]
; Prefer string-join in image-dired
* lisp/image/image-dired-dired.el (subr-x): Require.
(image-dired-dired-display-properties): Prefer string-join.
* lisp/image/image-dired.el (subr-x): Require.
(image-dired-update-header-line): Prefer string-join.
Lars Ingebrigtsen [Wed, 14 Sep 2022 00:30:54 +0000 (02:30 +0200)]
Fix recently-added cl-macs tests
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-case-error)
(cl-case-warning): Fix warning matches.
Lars Ingebrigtsen [Tue, 13 Sep 2022 16:32:30 +0000 (18:32 +0200)]
Make help-fns--generalized-variable more resilient
* lisp/help-fns.el (help-fns--generalized-variable): Don't bug out
when a key binding isn't a symbol.
Juri Linkov [Tue, 13 Sep 2022 18:17:55 +0000 (21:17 +0300)]
Prefer defvar-keymap for repeat-map in outline.el
* lisp/outline.el (outline-navigation-repeat-map)
(outline-editing-repeat-map): Prefer defvar-keymap.
Paul Eggert [Tue, 13 Sep 2022 17:41:34 +0000 (12:41 -0500)]
Port alignas definition to C23
* src/lisp.h (alignas): C23 is removing the __alignas_is_defined
macro, so do not rely on it. Instead, do not define alignas if C23
or later, or if C++11 or later.
Eli Zaretskii [Tue, 13 Sep 2022 17:00:30 +0000 (20:00 +0300)]
; * etc/NEWS: Fix wording of 'image-crop' entry.
Lars Ingebrigtsen [Tue, 13 Sep 2022 16:28:14 +0000 (18:28 +0200)]
Fix wallpaper.el build warning
* lisp/image/wallpaper.el (require): Fix build warning.
Lars Ingebrigtsen [Tue, 13 Sep 2022 16:25:32 +0000 (18:25 +0200)]
Revert "Fix help--analyze-key problem when not called from menu"
This reverts commit
7e374b96635ce70f574fba351defc765e9a52da9.
This should not be needed -- perhaps it was triggered by
an ephemeral code change in my running Emacs.
Stefan Kangas [Tue, 13 Sep 2022 16:02:21 +0000 (18:02 +0200)]
Use wallpaper-set in thumbs.el
* lisp/thumbs.el (wallpaper): Require.
(thumbs-setroot-command): Make defcustom obsolete.
(thumbs-call-setroot-command): Make obsolete in favor of
wallpaper-set.
(thumbs-set-image-at-point-to-root-window, thumbs-set-root)
(thumbs-dired-setroot): Use wallpaper-set instead of
thumbs-call-setroot-command.
(thumbs-before-setroot-hook, thumbs-after-setroot-hook): Make
obsolete.
Stefan Kangas [Tue, 13 Sep 2022 15:56:22 +0000 (17:56 +0200)]
Add new command image-dired-set-wallpaper
* lisp/image/image-dired.el (wallpaper): Require.
(image-dired-set-wallpaper): New command.
(image-dired-thumbnail-mode-map): Bind above new command to "W".
Stefan Kangas [Tue, 13 Sep 2022 14:57:01 +0000 (16:57 +0200)]
Add new library wallpaper.el
* lisp/image/wallpaper.el: New file.
Stefan Kangas [Tue, 13 Sep 2022 15:16:33 +0000 (17:16 +0200)]
; image-dired: Delete unnecessary :group arg
* lisp/image/image-dired.el (image-dired-db-file): Delete unnecessary
:group arg.
Lars Ingebrigtsen [Tue, 13 Sep 2022 16:24:14 +0000 (18:24 +0200)]
Remove a nil cl-case case
* lisp/emacs-lisp/testcover.el (testcover-coverage-combine):
Remove the nil case, which will never match (bug#51368).
Lars Ingebrigtsen [Tue, 13 Sep 2022 16:19:26 +0000 (18:19 +0200)]
Fix some misleading quoting in cl-case
* lisp/progmodes/compile.el (compilation-auto-jump):
* lisp/image/image-crop.el (image-crop--crop-image-1):
(image-crop--crop-image-1):
* lisp/image/exif.el (exif--process-value):
* lisp/image-mode.el (image-mode--next-file):
* lisp/dnd.el (dnd-begin-text-drag):
(dnd-begin-file-drag):
(dnd-begin-drag-files): Fix misleading quoting in cl-case (bug#51368).
Eli Zaretskii [Tue, 13 Sep 2022 15:58:21 +0000 (18:58 +0300)]
; * etc/NEWS: More detail about 'image-crop' and 'image-elide'.
Lars Ingebrigtsen [Tue, 13 Sep 2022 15:27:20 +0000 (17:27 +0200)]
Regenerated ldefs-boot.el
Philipp Stephani [Tue, 13 Sep 2022 15:12:57 +0000 (17:12 +0200)]
Have 'cl-case' warn about suspicious cases
* lisp/emacs-lisp/cl-macs.el (cl-case): Warn if the user passes a nil
key list (which would never match). Warn about quoted symbols that
should probably be unquoted.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-case-warning): New unit
test (bug#51368).
Philipp Stephani [Tue, 13 Sep 2022 15:11:53 +0000 (17:11 +0200)]
Signal an error if a fallback cl-case is misplaced
* lisp/emacs-lisp/cl-macs.el (cl-case): Warn if the user passes a nil
key list (which would never match). Warn about quoted symbols that
should probably be unquoted.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-case-warning): New unit
test (bug#51368).
Lars Ingebrigtsen [Tue, 13 Sep 2022 14:37:31 +0000 (16:37 +0200)]
Move imagep in image.c from the debugging section
* lisp/simple.el (imagep): Remove.
* src/image.c (Fimagep): Always define.
Lars Ingebrigtsen [Tue, 13 Sep 2022 14:14:37 +0000 (16:14 +0200)]
Fix help--analyze-key problem when not called from menu
* lisp/help.el (help--analyze-key): Don't bug out when not called
from the menu.
Eli Zaretskii [Tue, 13 Sep 2022 14:12:40 +0000 (17:12 +0300)]
; * src/image.c (svg_load_image): Another minor cleanup. (Bug#51104)
Lars Ingebrigtsen [Tue, 13 Sep 2022 13:52:56 +0000 (15:52 +0200)]
Add new commands 'image-crop' and 'image-elide'
* doc/lispref/display.texi (Showing Images): Document it.
* lisp/image.el (image-map): Bind commands.
* lisp/image/image-crop.el: New file (bug#51331).
Lars Ingebrigtsen [Tue, 13 Sep 2022 13:49:18 +0000 (15:49 +0200)]
Add new function imagep
* lisp/simple.el (imagep): New function.
Eli Zaretskii [Tue, 13 Sep 2022 13:49:02 +0000 (16:49 +0300)]
; Add commentary to comp-tests.el
Sigh... why do people insist on removing useful comments and leave
their tricky code more obfuscated than it must be??
* test/src/comp-tests.el (comp-tests-type-spec-tests): Add a
comment explaining why the expressions are quoted. (Bug#51104)
Gerd Möllmann [Tue, 13 Sep 2022 13:37:56 +0000 (15:37 +0200)]
Fix whitespace-tests on macOS
* test/lisp/whitespace-tests.el (whitespace-tests--empty-bob):
(whitespace-tests--empty-eob): Use C-a/C-e instead of
<home>/<end> (bug#57763).
Eli Zaretskii [Tue, 13 Sep 2022 13:39:26 +0000 (16:39 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Tue, 13 Sep 2022 13:38:50 +0000 (16:38 +0300)]
; * src/image.c (svg_load_image): Always free 'err' if non-NULL.
Stefan Monnier [Tue, 13 Sep 2022 13:36:21 +0000 (09:36 -0400)]
comp-tests.el: Enable compilation again
Rather than disable byte-compilation to circumvent bug#51104,
change the ELisp code so that `most-positive/negative-fixnum` does
not end up hardcoded in the `.elc` file.
* test/src/comp-tests.el (comp-tests-define-type-spec-test):
Don't quote the type expressions.
(comp-tests-type-spec-tests): Quote them here instead.
Eli Zaretskii [Tue, 13 Sep 2022 13:26:50 +0000 (16:26 +0300)]
Fix last change in image.c
* src/image.c (svg_load_image): Don't call Lisp to remove trailing
whitespace from librsvg error messages, do it in C instead; this
reduces consing and is much cleaner. Don't display empty error
reason if librsvg happens to return an empty message text.
(syms_of_image): Don't DEFSYM string-trim-right. (Bug#57755)
Stefan Kangas [Tue, 13 Sep 2022 13:05:28 +0000 (15:05 +0200)]
Prefer defvar-keymap in several cases
* lisp/calc/calc-embed.el (calc-override-minor-modes-map):
* lisp/calc/calc-yank.el (calc-edit-mode-map):
* lisp/calc/calc.el (calc-trail-mode-map):
* lisp/cedet/semantic/mru-bookmark.el (semantic-mru-bookmark-mode-map):
* lisp/cedet/semantic/util-modes.el (semantic-highlight-edits-mode-map)
(semantic-show-unmatched-syntax-mode-map)
(semantic-show-parser-state-mode-map)
(semantic-stickyfunc-mode-map, semantic-highlight-func-mode-map):
* lisp/cedet/srecode/srt-mode.el (srecode-template-mode-map):
* lisp/gnus/gnus-art.el (gnus-prev-page-map, gnus-next-page-map):
* lisp/gnus/gnus-search.el (gnus-search-minibuffer-map):
* lisp/gnus/score-mode.el (gnus-score-mode-map):
* lisp/gnus/smime.el (smime-mode-map):
* lisp/indent.el (edit-tab-stops-map):
* lisp/isearch.el (minibuffer-local-isearch-map):
* lisp/printing.el (pr-interface-map):
* lisp/progmodes/prog-mode.el (prog-mode-map):
* lisp/progmodes/subword.el (subword-mode-map):
* lisp/reveal.el (reveal-mode-map):
* lisp/strokes.el (strokes-mode-map):
* lisp/textmodes/flyspell.el (flyspell-mouse-map):
* lisp/textmodes/less-css-mode.el (less-css-mode-map):
* lisp/textmodes/remember.el (remember-mode-map)
(remember-notes-mode-map):
* lisp/wid-browse.el (widget-browse-mode-map):
* lisp/wid-edit.el (widget-key-sequence-map): Prefer defvar-keymap in
some easy-to-convert cases.
Lars Ingebrigtsen [Tue, 13 Sep 2022 12:31:59 +0000 (14:31 +0200)]
Enable undo in eww buffers
* lisp/net/eww.el (eww-render): Enable undo after rendering. This
allows using `undo' in text input boxes.
(eww-setup-buffer): Disable undo before rendering (bug#57750).
* lisp/net/shr.el (shr-image-fetched): Inhibit undo tracking.
Lars Ingebrigtsen [Tue, 13 Sep 2022 12:07:40 +0000 (14:07 +0200)]
Indirect Buffers manual improvement
* doc/emacs/buffers.texi (Indirect Buffers): There's no point in
mentioning both clone-indirect-buffer and
clone-indirect-buffer-other-window here since they do the pretty
much the same (bug#57753).
Eli Zaretskii [Tue, 13 Sep 2022 12:21:54 +0000 (15:21 +0300)]
; * test/src/comp-tests.el: Explain the last change.
dickmao [Tue, 13 Sep 2022 11:57:44 +0000 (13:57 +0200)]
Avoid double svg error reporting and segfaults
* src/image.c (svg_load_image): Use g_error_free directly instead
of the helder g_clear_error (since we're only calling it with
non-nil values).
(svg_load_image): Avoid segfault and double reporting errors.
* test/manual/image-tests.el (image-tests-load-image/svg-too-big)
(image-tests-load-image/svg-invalid): Test it (bug#57755).
Stefan Kangas [Tue, 13 Sep 2022 09:06:11 +0000 (11:06 +0200)]
; Fix last change in test/manual/image-tests.el
* test/manual/image-tests.el (image-skip-unless):
(image-tests-image-metadata/gif): Fix last change.
Stefan Kangas [Mon, 12 Sep 2022 15:03:26 +0000 (17:03 +0200)]
Prefer defvar-keymap in pixel-scroll-precision-mode-map
* lisp/pixel-scroll.el (pixel-scroll-precision-mode-map): Prefer
defvar-keymap.
Stefan Kangas [Mon, 12 Sep 2022 14:53:26 +0000 (16:53 +0200)]
Prefer defvar-keymap in tab-line.el
* lisp/tab-line.el (tab-line-tab-map, tab-line-add-map)
(tab-line-tab-close-map, tab-line-left-map, tab-line-right-map):
Prefer defvar-keymap.
Stefan Kangas [Mon, 12 Sep 2022 14:47:53 +0000 (16:47 +0200)]
Prefer defvar-keymap in lisp/epa*.el
* lisp/epa-ks.el (epa-ks-search-mode-map):
* lisp/epa.el (epa-key-list-mode-map, epa-key-mode-map): Prefer
defvar-keymap.
Po Lu [Tue, 13 Sep 2022 06:28:54 +0000 (14:28 +0800)]
Fix frames with explicit parent being unmapped after parent shuts down
* src/xterm.c (handle_one_xevent): Delete leftover _XEMBED_INFO
property after parent shuts down.
Stefan Kangas [Tue, 13 Sep 2022 04:30:41 +0000 (06:30 +0200)]
Merge from origin/emacs-28
86f0601392 ; * admin/notes/www: Fix typos.
2cdb9d03fd ; * admin/make-tarball.txt: Minor clarifications.
Stefan Kangas [Tue, 13 Sep 2022 04:30:41 +0000 (06:30 +0200)]
; Merge from origin/emacs-28
The following commit was skipped:
f771f122d2 ; Bump Emacs version past 28.2
Stefan Kangas [Tue, 13 Sep 2022 04:30:40 +0000 (06:30 +0200)]
Merge from origin/emacs-28
739b5d0e52 Update HISTORY for Emacs 28.2
Stefan Kangas [Tue, 13 Sep 2022 02:53:06 +0000 (04:53 +0200)]
; * admin/notes/www: Fix typos.
Paul Eggert [Mon, 12 Sep 2022 20:31:36 +0000 (15:31 -0500)]
Fix comp-tests.el problem after reconfiguring
* test/src/comp-tests.el: Do not byte-compile, as the .elc
file would be machine-dependent (bug#51104).
Juri Linkov [Mon, 12 Sep 2022 19:12:50 +0000 (22:12 +0300)]
Document the recently added branch commands (bug#50344)
* doc/emacs/maintaining.texi (VC Directory Commands): Change the
prefix key from "B" to "b". Replace vc-create-tag with vc-create-branch,
and vc-retrieve-tag with vc-switch-branch.
(Switching Branches): Mention vc-switch-branch bound to 'C-x v b s'.
(Creating Branches): Mention vc-create-branch bound to 'C-x v b c'.
* lisp/vc/vc-dir.el (vc-dir-mode-map): In branch keymap 'b' rebind
"c" from vc-create-tag to vc-create-branch, and "s" from
vc-retrieve-tag to vc-switch-branch.
Juri Linkov [Mon, 12 Sep 2022 18:41:17 +0000 (21:41 +0300)]
* lisp/vc/vc.el (vc-print-branch-log): Fix interactive spec.
For reading vc-read-revision in the interactive spec use the same 'backend'
and 'rootdir' as in the body of the same function.
Juri Linkov [Mon, 12 Sep 2022 18:07:05 +0000 (21:07 +0300)]
'C-x v b' prefix key is used for branch commands to create/switch/print branch
* lisp/vc/vc.el (vc-create-branch): New command.
(vc-retrieve-tag): Add new optional arg 'branchp'.
(vc-switch-branch): New command (bug#50344).
* lisp/vc/vc-hooks.el (vc-prefix-map): Bind "b c" to vc-create-branch,
"b l" to vc-print-branch-log, "b s" to vc-switch-branch. Remove obsolete
and suppressed "b" from vc-switch-backend.
* lisp/vc/vc-dir.el (vc-dir-mode-map): Rebind 'branch-map' from "B" to "b"
for consistency with 'vc-prefix-map'.
* lisp/vc/vc-git.el (vc-git-create-tag): For a new branch read
its start-point. Ask a confirmation if modified files exist.
Eli Zaretskii [Mon, 12 Sep 2022 17:02:59 +0000 (20:02 +0300)]
; * etc/NEWS: Fix typo and wording of recently added entry.
Sean Whitton [Mon, 12 Sep 2022 15:28:17 +0000 (08:28 -0700)]
; etc/NEWS: Fix typo.
Sean Whitton [Mon, 12 Sep 2022 15:08:16 +0000 (08:08 -0700)]
; etc/NEWS: Update for last change.
Sean Whitton [Mon, 12 Sep 2022 14:30:07 +0000 (07:30 -0700)]
Add new C-x w prefix map
* window.el (window-prefix-map): New map.
(ctl-x-map): Unbind split-root-window-below and
split-root-window-right. Bind window-prefix-map to C-x w.
Stefan Kangas [Mon, 12 Sep 2022 13:14:42 +0000 (15:14 +0200)]
Skip manual GIF metadata test on MS-Windows
* test/manual/image-tests.el
(image-skip-unless): Add new arg CONDITION.
(image-tests-image-metadata/gif): Skip test on MS-Windows when
using native image API. (Bug#57691)
Lars Ingebrigtsen [Mon, 12 Sep 2022 12:17:25 +0000 (14:17 +0200)]
Don't overwrite error message in `x' in package.el
* lisp/emacs-lisp/package.el (package-menu--perform-transaction):
Return whether there were errors.
(package-menu-execute): Don't overwrite the error message(s) with
a success message (bug#51201).
Lars Ingebrigtsen [Mon, 12 Sep 2022 11:09:23 +0000 (13:09 +0200)]
Remove some XEmacs references in speedbar.el
* lisp/speedbar.el (speedbar-toggle-etags): Remove some references
to etags support being XEmacs specific (bug#51102).
Lars Ingebrigtsen [Mon, 12 Sep 2022 10:57:34 +0000 (12:57 +0200)]
Document :vert-only tool bar property
* doc/lispref/keymaps.texi (Tool Bar): Document what :vert-only
does (bug#51049). This is not what it was intended to do -- but
what it intended to do didn't really make that much sense either,
so perhaps the prop should just be renamed :image-only?
Arthur Miller [Mon, 12 Sep 2022 10:38:09 +0000 (12:38 +0200)]
Remove edebug props in edebug-remove-instrumentation
* lisp/emacs-lisp/edebug.el (edebug--strip-plist): New function
(bug#51026).
(edebug-remove-instrumentation): Use it to remove pros added while
running edebug.
Lars Ingebrigtsen [Mon, 12 Sep 2022 10:23:52 +0000 (12:23 +0200)]
Fix length issues in gnus-cloud-make-chunk
* lisp/gnus/gnus-cloud.el (gnus-cloud-make-chunk): Make buffer
unibyte (bug#50988).
Stefan Kangas [Mon, 12 Sep 2022 10:15:01 +0000 (12:15 +0200)]
; * admin/make-tarball.txt: Minor clarifications.
Stefan Kangas [Mon, 12 Sep 2022 10:02:32 +0000 (12:02 +0200)]
; Bump Emacs version past 28.2
* README:
* configure.ac:
* nt/README.W32:
* msdos/sed2v2.inp:
* etc/NEWS: Bump Emacs version to 28.2.50.
Arash Esbati [Mon, 12 Sep 2022 07:34:23 +0000 (09:34 +0200)]
Consider key=val labels when renumbering
* lisp/textmodes/reftex-global.el (reftex-translate): Recognize
key=val labels given in the optional or mandatory argument of
environments (AUCTeX bug#57720).
* test/lisp/textmodes/reftex-tests.el
(reftex-renumber-simple-labels): New Test.
Michael Albinus [Mon, 12 Sep 2022 06:52:08 +0000 (08:52 +0200)]
Fix Tramp test
* lisp/net/tramp-compat.el (tramp-compat-rx):
Add `tramp-autoload' function property.
Po Lu [Mon, 12 Sep 2022 06:01:52 +0000 (14:01 +0800)]
Fix focus restoration upon x_mouse_leave again
* src/xterm.c (x_mouse_leave): Call xi_handle_focus_change after
changing the implicit focus.
Stefan Kangas [Mon, 12 Sep 2022 00:47:11 +0000 (02:47 +0200)]
Update HISTORY for Emacs 28.2
* etc/HISTORY: Update for the Emacs 28.2 release.
Dmitry Gutov [Sun, 11 Sep 2022 21:45:12 +0000 (00:45 +0300)]
* lisp/progmodes/xref.el: Bump the version.
Kévin Le Gouguec [Sun, 11 Sep 2022 17:55:01 +0000 (19:55 +0200)]
Restrict replace-*-in-region to the bounds defined by caller
* lisp/subr.el (replace-string-in-region, replace-regexp-in-region):
Narrow to region before iterating over matches, instead of giving a
bound to the search functions.
* test/lisp/subr-tests.el (test-replace-string-in-region): Add
regression tests (bug#57733).
Michael Albinus [Sun, 11 Sep 2022 12:53:14 +0000 (14:53 +0200)]
Disable Tramp cache for relative file names
* lisp/net/tramp.el (tramp-file-name-unify):
Return `tramp-cache-undefined' if LOCALNAME is a relative file name.
* lisp/net/tramp-cache.el (tramp-get-file-property)
(tramp-set-file-property, tramp-file-property-p)
(tramp-flush-file-property, tramp-flush-file-upper-properties)
(tramp-flush-file-properties): Handle KEY being
`tramp-cache-undefined'.
(tramp-flush-file-function): Revert last change.
Richard Hansen [Tue, 28 Jun 2022 20:25:43 +0000 (16:25 -0400)]
whitespace: Redo BoB/EoB empty line highlighting
* lisp/whitespace.el (whitespace--empty-at-bob-matcher,
whitespace--empty-at-eob-matcher, whitespace--update-bob-eob,
whitespace-color-off, whitespace-color-on,
whitespace-empty-at-bob-regexp, whitespace-empty-at-eob-regexp,
whitespace-looking-back, whitespace-post-command-hook): Redo the
`empty' line highlighting logic to ensure that a buffer change causes
all affected `empty' lines to become (un)highlighted (bug#37467).
Also, for improved UX, don't highlight BoB empty lines at or below
point (not just when point is at 1), or EoB empty lines at or above
point (not just when point is `eobp').
(whitespace-bob-marker, whitespace-eob-marker): Clarify documentation.
* test/lisp/whitespace-tests.el (whitespace--with-test-buffer,
whitespace--fu, whitespace-tests--empty-bob,
whitespace-tests--empty-eob): Add tests.
Richard Hansen [Tue, 28 Jun 2022 19:05:04 +0000 (15:05 -0400)]
whitespace: Include empty final line in BoB empty match
* lisp/whitespace.el (whitespace-empty-at-bob-regexp): Include any
last line trailing whitespace in the BoB empty line match to ensure
that those characters get highlighted.
Richard Hansen [Wed, 22 Jun 2022 21:29:39 +0000 (17:29 -0400)]
whitespace: Reset `whitespace-buffer-changed' when refontifying
* lisp/whitespace.el (whitespace-post-command-hook): Add missing reset
of `whitespace-buffer-changed' back to nil between commands.
Richard Hansen [Wed, 22 Jun 2022 23:02:42 +0000 (19:02 -0400)]
; whitespace: Use `defvar-local' for buffer-local vars
Richard Hansen [Wed, 22 Jun 2022 22:06:49 +0000 (18:06 -0400)]
; whitespace: Delete unused `whitespace-font-lock-refontify' var
Richard Hansen [Tue, 28 Jun 2022 05:10:48 +0000 (01:10 -0400)]
ert-x: New `ert-with-test-buffer-selected' convenience macro
* lisp/emacs-lisp/ert-x.el (ert-with-test-buffer-selected): New
convenience macro that extends `ert-with-test-buffer' by displaying
the test buffer in a temporary selected window. This makes it easier
to simulate user input in the body via `execute-kbd-macro'.
* test/lisp/emacs-lisp/ert-x-tests.el
(ert-test-test-buffer-selected/*): Add tests.
Philip Kaludercic [Sun, 11 Sep 2022 11:28:38 +0000 (13:28 +0200)]
Revert "Add new command 'toggle-theme'"
This reverts commit
f31b9d86a67f1b3fd70339f277dff52478890351.
Philip Kaludercic [Sun, 11 Sep 2022 11:28:36 +0000 (13:28 +0200)]
Revert "Add new user option 'custom-ensure-single-theme'"
This reverts commit
b4dbf7184cd68ecd8d1a27fbc1407be0eae7e64c.
Philip Kaludercic [Sun, 11 Sep 2022 11:12:39 +0000 (13:12 +0200)]
; Use US spelling docstring
* lisp/vc/diff-mode.el (diff-add-log-use-relative-names): Update docstring.
Philip Kaludercic [Tue, 6 Sep 2022 19:04:08 +0000 (21:04 +0200)]
Add new user option 'custom-ensure-single-theme'
* etc/NEWS: Mention it.
* lisp/custom.el (custom-ensure-single-active-theme): Add it.
(load-theme): Use it.
Philip Kaludercic [Tue, 6 Sep 2022 18:53:35 +0000 (20:53 +0200)]
Add new command 'toggle-theme'
* doc/emacs/custom.texi (Custom Themes): Mention it.
* etc/themes/leuven-dark-theme.el (leuven-dark): Add dual theme.
* etc/themes/leuven-theme.el (leuven): Add dual theme.
* etc/themes/tango-dark-theme.el (tango-dark): Add dual theme.
* etc/themes/tango-theme.el (tango): Add dual theme.
* etc/themes/tsdh-dark-theme.el (tsdh-dark): Add dual theme.
* etc/themes/tsdh-light-theme.el (tsdh-light): Add dual theme.
* lisp/cus-theme.el (describe-theme-1): Say if a theme has a dual.
* lisp/custom.el (toggle-theme): Add new command.
Miha Rihtaršič [Sun, 11 Sep 2022 10:59:02 +0000 (12:59 +0200)]
Improve some shell highlight doc strings
* lisp/shell.el (shell-highlight-undef-mode-restart): Rename function.
* lisp/shell.el (shell-comint-fl-enable):
(shell--highlight-undef-indirect)
* lisp/ielm.el (ielm-comint-fl-enable):
* lisp/comint.el: (comint--fl-fontify-region): Improve doc strings.
Po Lu [Sun, 11 Sep 2022 08:50:16 +0000 (16:50 +0800)]
Make it easier to clear the Motif drag window for debugging
* src/xterm.c (xm_get_drag_window_1): Add comment explaining
side effect of x_special_window_exists_p.
(handle_one_xevent): Clear Motif drag window upon DestroyNotify.
In addition to debugging, it also reduces syncs necessary to
communicate via the Motif protocol after a defective/old client
sets the drag window without setting the disconnect mode.
Juri Linkov [Sun, 11 Sep 2022 08:22:11 +0000 (11:22 +0300)]
* lisp/vc/vc.el (vc-diff-patch-string): Fix arg in revert-buffer-function.
Sean Whitton [Sun, 11 Sep 2022 06:10:45 +0000 (23:10 -0700)]
* lisp/vc/vc.el (vc-deduce-backend): Handle eshell-mode.
ookami [Sat, 10 Sep 2022 12:56:08 +0000 (14:56 +0200)]
Fix project-remember-projects-under when recursing
* lisp/progmodes/project.el (project-remember-projects-under):
Actually recurse into directories (bug#57714).
Copyright-paperwork-exempt: yes
Michael Albinus [Sat, 10 Sep 2022 11:10:47 +0000 (13:10 +0200)]
Ensure, that Tramp cache works over absolute file names
* lisp/net/tramp.el (tramp-skeleton-directory-files)
(tramp-skeleton-directory-files-and-attributes)
(tramp-skeleton-set-file-modes-times-uid-gid)
(tramp-handle-add-name-to-file, tramp-handle-file-exists-p)
(tramp-handle-file-readable-p, tramp-handle-file-writable-p):
* lisp/net/tramp-adb.el (tramp-adb-handle-file-executable-p)
(tramp-adb-handle-file-exists-p)
(tramp-adb-handle-file-readable-p)
(tramp-adb-handle-file-writable-p)
* lisp/net/tramp-gvfs.el (tramp-gvfs-info, tramp-gvfs-handle-delete-file)
(tramp-gvfs-get-directory-attributes)
(tramp-gvfs-get-root-attributes)
(tramp-gvfs-handle-file-executable-p):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link)
(tramp-sh-handle-file-exists-p)
(tramp-sh-handle-set-visited-file-modtime)
(tramp-sh-handle-file-selinux-context)
(tramp-sh-handle-set-file-selinux-context)
(tramp-sh-handle-file-acl, tramp-sh-handle-file-executable-p)
(tramp-sh-handle-file-readable-p)
(tramp-sh-handle-file-directory-p)
(tramp-sh-handle-file-writable-p)
(tramp-sh-handle-file-ownership-preserved-p)
(tramp-sh-handle-add-name-to-file)
(tramp-sh-handle-copy-directory, tramp-sh-handle-delete-file)
(tramp-sh-handle-dired-compress-file):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-add-name-to-file)
(tramp-sudoedit-handle-delete-file)
(tramp-sudoedit-handle-file-acl)
(tramp-sudoedit-handle-file-executable-p)
(tramp-sudoedit-handle-file-exists-p)
(tramp-sudoedit-handle-file-readable-p)
(tramp-sudoedit-handle-file-selinux-context)
(tramp-sudoedit-handle-file-writable-p)
(tramp-sudoedit-handle-make-symbolic-link)
(tramp-sudoedit-handle-set-file-selinux-context):
Use `expand-file-name'. (Bug#57572)
* lisp/net/tramp-cache.el (tramp-flush-file-function):
Expand `buffer-file-name'. (Bug#57676)
* lisp/net/tramp.el (tramp-file-name-unify): Extend error message.
* lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link):
* lisp/net/tramp-smb.el (tramp-smb-handle-make-symbolic-link):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-make-symbolic-link):
Do not check remoteness of TARGET anymore.
Po Lu [Sat, 10 Sep 2022 10:49:53 +0000 (18:49 +0800)]
Fix compliance with the XDND specification when dropping on a proxy
* src/xterm.c (x_dnd_send_enter, x_dnd_send_position)
(x_dnd_send_leave, x_dnd_send_drop, x_dnd_do_drop): New
parameter `toplevel'. Use it as the window in sent client
messages.
(x_dnd_cancel_dnd_early, x_dnd_cleanup_drag_and_drop)
(x_dnd_process_quit, x_dnd_update_state, handle_one_xevent)
(x_connection_closed): Give the right toplevel to the client
message sending functions.
Eli Zaretskii [Sat, 10 Sep 2022 08:48:11 +0000 (11:48 +0300)]
; * lisp/minibuffer.el (format-prompt): Doc fix.
Paul Eggert [Sat, 10 Sep 2022 06:20:31 +0000 (08:20 +0200)]
Make wdired match dired with symlink permissions
* lisp/wdired.el (wdired-do-perm-changes): Do not follow symlinks,
to be consistent with plain dired (bug#50189).
Lars Ingebrigtsen [Sat, 10 Sep 2022 06:13:21 +0000 (08:13 +0200)]
Make `format-prompt' use `substitute-command-keys'
* doc/lispref/minibuf.texi (Text from Minibuffer): Mention it.
* lisp/minibuffer.el (format-prompt): Run through
`substitute-command-keys' (bug#51040).