]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years ago; Clarify wording of some doc strings in shortdoc.el
Eli Zaretskii [Sun, 25 Sep 2022 19:49:32 +0000 (22:49 +0300)]
; Clarify wording of some doc strings in shortdoc.el

* lisp/emacs-lisp/shortdoc.el (shortdoc-next, shortdoc-previous)
(shortdoc-next-section, shortdoc-previous-section): Clarify
wording.

2 years agotex-mode.el: Don't override AUCTeX modes
Stefan Monnier [Sun, 25 Sep 2022 17:51:30 +0000 (13:51 -0400)]
tex-mode.el: Don't override AUCTeX modes

* lisp/textmodes/tex-mode.el (TeX-mode, plain-TeX-mode, LaTeX-mode):
Only define them as aliases in `lisp/loaddefs.el` so we don't
override AUCTeX's own definitions when we load `tex-mode.el`.

2 years agoBoolean constant detection additions
Mattias Engdegård [Sun, 25 Sep 2022 15:47:39 +0000 (17:47 +0200)]
Boolean constant detection additions

* lisp/emacs-lisp/byte-opt.el (byte-opt--bool-value-form):
`set` is boolean identity in its second argument.
(byte-compile-trueconstp): `set-marker` is always true.

2 years ago; * src/fns.c (Fcopy_alist): More accurate error type
Mattias Engdegård [Sun, 25 Sep 2022 15:44:29 +0000 (17:44 +0200)]
; * src/fns.c (Fcopy_alist): More accurate error type

2 years agoRefactor system specific code in wallpaper.el
Stefan Kangas [Sun, 25 Sep 2022 15:27:20 +0000 (17:27 +0200)]
Refactor system specific code in wallpaper.el

* lisp/image/wallpaper.el (wallpaper-set-function): New defvar
containing system specific function for setting wallpaper.
(wallpaper-default-set-function): Factor out function from...
(wallpaper-set): ...here.  Use above new defvar.

(wallpaper-default-file-name-regexp): Delete defvar.
(wallpaper-image-file-extensions): New defvar.
(wallpaper--image-file-regexp): New defun that returns a regexp to
match for completion purposes.

(wallpaper--use-default-set-function-p): New defun.
(wallpaper--find-command, wallpaper--find-command-arguments):
Do nothing on MS-Windows and Haiku.

2 years agoDon't crash in copy-alist with non-list argument
Mattias Engdegård [Sun, 25 Sep 2022 15:03:32 +0000 (17:03 +0200)]
Don't crash in copy-alist with non-list argument

* src/fns.c (Fcopy_alist): Check argument type.
* test/src/fns-tests.el (fns--copy-alist): New test.

2 years agoAdd reasonable default to wallpaper-set
Stefan Kangas [Sun, 25 Sep 2022 14:16:51 +0000 (16:16 +0200)]
Add reasonable default to wallpaper-set

* lisp/image/wallpaper.el
(wallpaper-default-file-name-regexp): New variable.
(wallpaper--get-default-file): New function.
(wallpaper-set): Use above new function to set a default.
* test/lisp/image/wallpaper-tests.el: New file.

2 years agoAdd :buffer argument to ert-with-temp-file
Stefan Kangas [Sun, 25 Sep 2022 14:16:30 +0000 (16:16 +0200)]
Add :buffer argument to ert-with-temp-file

* lisp/emacs-lisp/ert-x.el (ert-with-temp-file): Add new keyword
argument :buffer SYMBOL to visit the file with `find-file-literally'
before running the body, and cleaning up after.

2 years agoImplement font-use-system-font on Haiku
Po Lu [Sun, 25 Sep 2022 13:22:45 +0000 (13:22 +0000)]
Implement font-use-system-font on Haiku

* doc/emacs/frames.texi (Fonts): Update documentation to say
what font-use-system-font really does and where it can be used.
* src/haiku_font_support.cc (language_code_points): Fix coding
style.
(font_style_to_flags, be_font_style_to_flags): Accept const char
*.
(be_send_font_settings, be_listen_font_settings)
(be_lock_font_defaults, be_unlock_font_defaults)
(be_get_font_default, be_get_font_size): New functions used to
retrieve default font data.

* src/haiku_io.c (haiku_len): Handle FONT_CHANGE_EVENT.
* src/haiku_support.h (enum haiku_event_type): New event type
FONT_CHANGE_EVENT.
(enum haiku_what_font): New enum.
(struct haiku_font_change_event): New struct.

* src/haikufont.c (Ffont_get_system_normal_font)
(Ffont_get_system_font, haiku_handle_font_change_event): New
functions.
(syms_of_haikufont): Provide `dynamic-setting' and define new
variables and subrs.

* src/haikuterm.c (haiku_default_font_parameter): Use system font.
(haiku_read_socket): Handle FONT_CHANGE_EVENTS.
(haiku_term_init): Start listening for font configuration changes.
* src/haikuterm.h: Update prototypes.

* src/xsettings.c (Ffont_get_system_normal_font)
(Ffont_get_system_font): Update doc string.
(syms_of_xsettings): Replace calls to intern with a static
string.

2 years agowallpaper: URI-encode gsettings argument
Stefan Kangas [Sun, 25 Sep 2022 12:57:28 +0000 (14:57 +0200)]
wallpaper: URI-encode gsettings argument

* lisp/image/wallpaper.el (wallpaper--default-commands)
(wallpaper-command-args, wallpaper-set): URI-encode gsettings
argument.

2 years agoImprove shortdoc documentation
Stefan Kangas [Sun, 25 Sep 2022 12:26:40 +0000 (14:26 +0200)]
Improve shortdoc documentation

* doc/emacs/help.texi (Name Help):
* doc/lispref/help.texi (Documentation Groups): Refer to
'shortdoc' convenience alias instead of 'shortdoc-display-group'.
* lisp/emacs-lisp/shortdoc.el: Add Commentary.
(shortdoc-next, shortdoc-previous)
(shortdoc-next-section, shortdoc-previous-section): Doc fixes.

2 years agoMake image-dired-thumb-name more portable
Stefan Kangas [Sun, 25 Sep 2022 12:22:06 +0000 (14:22 +0200)]
Make image-dired-thumb-name more portable

* lisp/image/image-dired-util.el
(image-dired-thumb-name): Create file names in a portable manner.
* test/lisp/image/image-dired-util-tests.el
(image-dired-thumb-name/standard)
(image-dired-thumb-name/image-dired)
(image-dired-thumb-name/per-directory): Expand tests.

2 years agoFix shortdoc movement commands
Stefan Kangas [Sun, 25 Sep 2022 11:54:37 +0000 (13:54 +0200)]
Fix shortdoc movement commands

* lisp/emacs-lisp/shortdoc.el (shortdoc--goto-section): Don't skip
over current function or section when searching.

2 years agoAdd new command 'shortdoc-copy-function-as-kill'
Stefan Kangas [Sun, 25 Sep 2022 11:48:12 +0000 (13:48 +0200)]
Add new command 'shortdoc-copy-function-as-kill'

* lisp/emacs-lisp/shortdoc.el
(shortdoc-copy-function-as-kill): New command.
(shortdoc-mode-map): Bind above new command to "w".

2 years ago* etc/NEWS.22: Belatedly announce 'dired-copy-filename-as-kill'.
Stefan Kangas [Sun, 25 Sep 2022 11:42:57 +0000 (13:42 +0200)]
* etc/NEWS.22: Belatedly announce 'dired-copy-filename-as-kill'.

2 years agoBind "N"/"P" to next/prev section in shortdoc
Stefan Kangas [Sun, 25 Sep 2022 11:22:17 +0000 (13:22 +0200)]
Bind "N"/"P" to next/prev section in shortdoc

* lisp/emacs-lisp/shortdoc.el (shortdoc-mode-map): Bind "N" and
"P" to 'shortdoc-next-section' and 'shortdoc-previous-section'.

2 years ago* lisp/bookmark.el (bookmark-rename): Improve prompt.
Stefan Kangas [Sun, 25 Sep 2022 10:49:23 +0000 (12:49 +0200)]
* lisp/bookmark.el (bookmark-rename): Improve prompt.

2 years agoAdd new command image-dired-copy-filename-as-kill
Stefan Kangas [Sat, 24 Sep 2022 22:37:40 +0000 (00:37 +0200)]
Add new command image-dired-copy-filename-as-kill

* lisp/image/image-dired.el
(image-dired-copy-filename-as-kill): New command.
(image-dired-thumbnail-mode-map): Bind above new command to "w".

2 years ago* lisp/net/rcirc.el (rcirc-print): Remove 'fill-region' call
Philip Kaludercic [Sun, 25 Sep 2022 08:29:40 +0000 (10:29 +0200)]
* lisp/net/rcirc.el (rcirc-print): Remove 'fill-region' call

See Bug#57376.

2 years agoAdd formatting commands to rcirc
Philip Kaludercic [Sun, 25 Sep 2022 08:22:25 +0000 (10:22 +0200)]
Add formatting commands to rcirc

* etc/NEWS: Mention new command
* lisp/net/rcirc.el (rcirc-format): Add new utility function.
(rcirc-unformat):  Add new command.
(rcirc-format-bold): Add new command.
(rcirc-format-italic): Add new command.
(rcirc-format-underline): Add new command.
(rcirc-format-strike-trough): Add new command.
(rcirc-format-fixed-width): Add new command.
(rcirc-mode-map): Bind formatting commands.
(rcirc-multiline-minor-mode-map): Bind formatting commands.

2 years agoTweak window handling in vc-pull-and-push
Lars Ingebrigtsen [Sat, 24 Sep 2022 20:43:26 +0000 (22:43 +0200)]
Tweak window handling in vc-pull-and-push

* lisp/vc/vc-dispatcher.el (vc--inhibit-async-window): Rename
variable.
(vc-do-async-command): Allow inhibiting all window changes.

* lisp/vc/vc-git.el (vc-git-pull-and-push): Don't pop up the
window asynchronously on the "pull" because that gets in the way
of doing other things.

2 years ago; Drop two obsolete defvars
Sean Whitton [Sat, 24 Sep 2022 19:06:47 +0000 (12:06 -0700)]
; Drop two obsolete defvars

* lisp/vc/vc-git.el (vc-want-edit-command-p)
* lisp/vc/vc.el (vc-want-edit-command-p): Drop obsolete defvar.

2 years ago; Simplify image-dired-forward-image
Stefan Kangas [Sat, 24 Sep 2022 18:18:48 +0000 (20:18 +0200)]
; Simplify image-dired-forward-image

* lisp/image/image-dired.el (image-dired-forward-image): Simplify.

2 years agoimage-dired: Add faces for header line
Stefan Kangas [Sat, 24 Sep 2022 18:08:25 +0000 (20:08 +0200)]
image-dired: Add faces for header line

* lisp/image/image-dired.el (image-dired-thumb-header-file-name)
(image-dired-thumb-header-directory-name)
(-image-dired-thumb-header-file-size)
(image-dired-thumb-header-image-count): New faces.
(image-dired-format-properties-string): Use above new faces.
(image-dired-thumb-mark, image-dired-thumb-flagged): Move
definition further down.

2 years agoimage-dired: Add new %-format specifiers for header line
Stefan Kangas [Sat, 24 Sep 2022 08:45:37 +0000 (10:45 +0200)]
image-dired: Add new %-format specifiers for header line

* lisp/image/image-dired.el
(image-dired-format-properties-string): Add new specifiers "%n", "%d",
and "%s".
(image-dired-display-properties-format): Change default format to use
above new specifiers.
(image-dired--number-of-thumbnails): New variable.
(image-dired-insert-thumbnail, image-dired-display-thumbs): Keep
track of file number when appending it into the thumbnail buffer.
(image-dired--update-header-line): Support above new format
specifiers.  Rename from 'image-dired-update-header-line' and
update callers.
* lisp/image/image-dired-dired.el
(image-dired-dired-display-properties): Support above new format
specifiers.

2 years agoGeneralize & simplify implementation of user edits to VC commands
Sean Whitton [Sat, 24 Sep 2022 17:39:52 +0000 (10:39 -0700)]
Generalize & simplify implementation of user edits to VC commands

* lisp/vc/vc-dispatcher.el (vc-pre-command-functions)
(vc-want-edit-command-p): Delete.
(vc-filter-command-function): New variable.
(vc-user-edit-command): Factor out of vc-do-command.
(vc-do-command, vc-do-async-command)
* lisp/vc/vc-git.el (vc-git--pushpull)
* lisp/vc/vc.el (vc-print-branch-log): Use vc-filter-command-function
in place of vc-pre-command-functions and vc-want-edit-command-p.

2 years ago* lisp/emacs-lisp/icons.el (icons--create): Use default rotation 0 (bug#57813)
Juri Linkov [Sat, 24 Sep 2022 17:17:28 +0000 (20:17 +0300)]
* lisp/emacs-lisp/icons.el (icons--create): Use default rotation 0 (bug#57813)

2 years agoAdapt tramp-docker integration
Michael Albinus [Sat, 24 Sep 2022 16:44:32 +0000 (18:44 +0200)]
Adapt tramp-docker integration

* doc/misc/tramp.texi (Inline methods): Add docker.
(Customizing Methods): Remove docker-tramp.  Adapt references to this.

* etc/NEWS: Mention new Tramp method "docker".  Fix typos.

* lisp/net/tramp-compat.el (docker-tramp): Warn, if that package is used.

* lisp/net/tramp-docker.el: Format header lines.
(tramp-docker): Remove custom group.
(tramp-docker-program, tramp-docker-method): Add
;;;###tramp-autoload cookie.
(tramp-docker-program): Change group to `tramp'.  Add version.
(tramp-docker--completion-function): Fix docstring.
(tramp-docker--add-method, tramp-docker--remove-method)
(tramp-docker-unload-function, tramp-docker-setup): Remove functions.
(tramp-methods, tramp-set-completion-function): Initialize via
`tramp--with-startup'.
(tramp-unload-hook):  Unload `tramp-docker'.

2 years agoimage-dired: Move menu definitions to keymaps
Stefan Kangas [Sat, 24 Sep 2022 16:27:35 +0000 (18:27 +0200)]
image-dired: Move menu definitions to keymaps

* lisp/image/image-dired.el (image-dired-thumbnail-mode-menu):
* lisp/image/image-dired-dired.el (image-dired-minor-mode-menu):
Delete variables and move menus to...
* lisp/image/image-dired.el (image-dired-thumbnail-mode-map):
* lisp/image/image-dired-dired.el(image-dired-minor-mode-map):
...here.

2 years agoEnsure no memory leaks of glyph_matrix
Manuel Giraud [Fri, 23 Sep 2022 15:14:44 +0000 (17:14 +0200)]
Ensure no memory leaks of glyph_matrix

; * src/dispnew.c (allocate_matrices_for_window_redisplay): Allocate
each glyph_matrix only when it's NULL.  (Bug#58028)

2 years agoMerge remote-tracking branch 'refs/remotes/origin/master'
Stefan Monnier [Sat, 24 Sep 2022 15:09:25 +0000 (11:09 -0400)]
Merge remote-tracking branch 'refs/remotes/origin/master'

2 years agohideshow.el: Improve hs-toggle-hiding behavior
kobarity [Mon, 19 Sep 2022 04:43:33 +0000 (13:43 +0900)]
hideshow.el: Improve hs-toggle-hiding behavior

* lisp/progmodes/hideshow.el
(hs-find-block-beginning-match): New function to be used in
`hs-already-hidden-p'.
(hs-already-hidden-p): Add check if beginning of line is inside a
block.
(hs-toggle-hiding): Don't change to selected-window's buffer when
event arg is absent.

* test/lisp/progmodes/hideshow-tests.el
(hideshow-tests-with-temp-buffer-selected): New helper macro.
(hideshow-tests-make-event-at): New helper function.
(hideshow-already-hidden-p-1): New test.
(hideshow-toggle-hiding-1): New test.
(hideshow-mouse-toggle-hiding-1): New test (bug#52092).

2 years agoRegenerated ldefs-boot.el
Lars Ingebrigtsen [Sat, 24 Sep 2022 14:51:37 +0000 (16:51 +0200)]
Regenerated ldefs-boot.el

2 years agoRemove "manual" package--builtin-versions updates
Lars Ingebrigtsen [Sat, 24 Sep 2022 14:46:22 +0000 (16:46 +0200)]
Remove "manual" package--builtin-versions updates

* lisp/emacs-lisp/nadvice.el:
* lisp/emacs-lisp/cl-generic.el: Don't push to
package--builtin-versions "manually", because loaddefs-gen does
this correctly now.

2 years ago* lisp/net/tramp-docker.el: New file.
Brian Cully [Sat, 24 Sep 2022 14:48:01 +0000 (16:48 +0200)]
* lisp/net/tramp-docker.el: New file.

2 years ago(event-start/end): Fix part of bug#52092
Stefan Monnier [Sat, 24 Sep 2022 14:38:09 +0000 (10:38 -0400)]
(event-start/end): Fix part of bug#52092

When synthesizing a posn for keyboard events, make sure the `posn-point`
i the same as `point`.

* lisp/subr.el (event--posn-at-point): New function.
(event-start, event-end): Use it.

2 years agoMerge branch 'emacs-28'
Stefan Monnier [Sat, 24 Sep 2022 14:32:39 +0000 (10:32 -0400)]
Merge branch 'emacs-28'

2 years ago* lisp/progmodes/hideshow.el (hs-toggle-hiding): Fix `interactive` form
Stefan Monnier [Sat, 24 Sep 2022 14:24:54 +0000 (10:24 -0400)]
* lisp/progmodes/hideshow.el (hs-toggle-hiding): Fix `interactive` form

This fixes the first part of bug#52092, which is a regression
introduced by commit d0e9113de97.

2 years agoMake dired-do-rename refuse to rename . and ..
Lars Ingebrigtsen [Sat, 24 Sep 2022 13:27:50 +0000 (15:27 +0200)]
Make dired-do-rename refuse to rename . and ..

* lisp/dired-aux.el (dired-do-rename): Refuse to rename . and ..
(bug#52004).  This used to error out after renaming.

2 years agoAdd a new command vc-pull-and-push
Lars Ingebrigtsen [Sat, 24 Sep 2022 13:17:23 +0000 (15:17 +0200)]
Add a new command vc-pull-and-push

* lisp/vc/vc-svn.el (vc-exec-after):
* lisp/vc/vc-hg.el (vc-exec-after):
* lisp/vc/vc-git.el (vc-exec-after):
* lisp/vc/vc-cvs.el (vc-exec-after):
* lisp/vc/vc-bzr.el (vc-exec-after):
* lisp/org/org-macro.el (vc-exec-after):
* lisp/obsolete/vc-mtn.el (vc-exec-after):
* lisp/obsolete/vc-arch.el (vc-exec-after): Update declaration.
* lisp/vc/vc-dispatcher.el (vc--process-sentinel): Allow running
code only on success.
(vc-exec-after): Ditto.
(vc--inhibit-change-window-start): New variable.
(vc-do-async-command): Use it to allow chaining commands without
moving window point.  Return the process instead of the buffer,
since the process may have exited already, and then we can't get
at the process.

* lisp/vc/vc-git.el (vc-git--pushpull): Return the process object.
(vc-git-pull-and-push): New function.

* lisp/vc/vc.el (vc-pull-and-push): New command (bug#51964).

2 years agoTweak binding of `+' in vc-dir
Lars Ingebrigtsen [Sat, 24 Sep 2022 13:07:17 +0000 (15:07 +0200)]
Tweak binding of `+' in vc-dir

* lisp/vc/vc-dir.el (vc-dir-mode-map): Point to the actual
function instead of the alias.  This makes *Help* more helpful.

2 years agoCC Mode. Make AWK Mode work with electric-pair-mode
Alan Mackenzie [Sat, 24 Sep 2022 12:23:32 +0000 (12:23 +0000)]
CC Mode.  Make AWK Mode work with electric-pair-mode

Also fix some minor anomalies with other CC Mode modes in electric-pair-mode.
This fixes bug #53446.

* lisp/progmodes/cc-mode.el (c-open-string-opener): New buffer local
variable.
(c-after-change-mark-abnormal-strings): Set c-open-string-opener when an
unbalanced string is detected.
(c-before-change): Initilize c-open-string-opener to nil, each buffer change.
(c-electric-pair-inhibit-predicate): Use the value of c-open-string-opener to
flag an unbalaced string rather than trying to calculate it again.

* lisp/progmodes/cc-awk.el (c-awk-syntax-tablify-string): Set
c-open-string-opener when an unbalanced string is detected.

2 years agodocview: Use svg images when using mupdf for conversion
Visuwesh [Sat, 24 Sep 2022 12:09:53 +0000 (14:09 +0200)]
docview: Use svg images when using mupdf for conversion

* lisp/doc-view.el (doc-view-mupdf-use-svg, doc-view-svg-background)
(doc-view-svg-foreground): New user options.
(doc-view-insert-image): Add :background and :foreground image
attributes when display svg images.
(doc-view-set-up-single-converter): Produce svg images when using
mupdf (bug#58041).

2 years agoimage-dired: Prefer command remapping
Stefan Kangas [Sat, 24 Sep 2022 12:07:55 +0000 (14:07 +0200)]
image-dired: Prefer command remapping

* lisp/image/image-dired.el (image-dired-thumbnail-mode-map):
Prefer command remapping to binding keys directly.

2 years agoimage-dired: Fix C-a/C-e in thumbnail buffer
Stefan Kangas [Sat, 24 Sep 2022 11:36:39 +0000 (13:36 +0200)]
image-dired: Fix C-a/C-e in thumbnail buffer

* lisp/image/image-dired.el
(image-dired--movement-ensure-point-pos): New function, and...
(image-dired--movement-command): ...new macros broken out from...
(image-dired-next-line, image-dired-previous-line)
(image-dired-beginning-of-buffer, image-dired-end-of-buffer):
...here.
(image-dired-move-beginning-of-line)
(image-dired-move-end-of-line): New commands.
(image-dired-thumbnail-mode-map): Remap 'move-beginning-of-line'
and 'move-beginning-of-line' to above new commands.

2 years agoMake thumbs.el obsolete
Stefan Kangas [Sat, 24 Sep 2022 11:22:59 +0000 (13:22 +0200)]
Make thumbs.el obsolete

* lisp/obsolete/thumbs.el: Add Obsolete-since.
* etc/NEWS: Announce obsoletion of thumbs.el.  (Bug#57779)

2 years agoMove thumbs.el to lisp/obsolete
Stefan Kangas [Sat, 24 Sep 2022 11:18:38 +0000 (13:18 +0200)]
Move thumbs.el to lisp/obsolete

* lisp/thumbs.el:
* test/lisp/thumbs-tests.el: Move from here...
* lisp/obsolete/thumbs.el:
* test/lisp/obsolete/thumbs-tests.el: ...to here.  (Bug#57779)

2 years agoimage-dired: Regenerate old thumbnails when needed
Stefan Kangas [Sat, 24 Sep 2022 11:08:11 +0000 (13:08 +0200)]
image-dired: Regenerate old thumbnails when needed

* lisp/image/image-dired.el
(image-dired--get-create-thumbnail-file): Rename from
'image-dired-get-thumbnail-image'.  Update callers and make old
name into an obsolete alias.
(image-dired-display-thumbs): Use above function to simplify and
regenerate the thumbnail if it's outdated.

2 years agoimage-dired: Improve performance of marking commands
Stefan Kangas [Sat, 24 Sep 2022 10:44:11 +0000 (12:44 +0200)]
image-dired: Improve performance of marking commands

* lisp/image/image-dired.el (image-dired-thumbnail-storage): Mark
(image-dired--thumb-update-mark-at-point): New function.
(image-dired--thumb-update-marks):
(image-dired--do-mark-command):  Use it.
(image-dired--thumb-update-marks): Rename from
'image-dired-thumb-update-marks'.  Update all callers and make the
old name into an obsolete alias.

2 years agoimage-dired: Mark 'per-directory' as :safe
Stefan Kangas [Sat, 24 Sep 2022 10:38:41 +0000 (12:38 +0200)]
image-dired: Mark 'per-directory' as :safe

* lisp/image/image-dired.el (image-dired-thumbnail-storage): Mark
'per-directory' value as :safe.

2 years agoAdd new macro image-dired--with-dired-buffer
Stefan Kangas [Sat, 24 Sep 2022 09:49:46 +0000 (11:49 +0200)]
Add new macro image-dired--with-dired-buffer

* lisp/image/image-dired-util.el
(image-dired--with-dired-buffer): New macro.
* lisp/image/image-dired.el (image-dired-track-original-file)
(image-dired--on-file-in-dired-buffer)
(image-dired--do-mark-command)
(image-dired--on-file-in-dired-buffer)
(image-dired-jump-original-dired-buffer)
(image-dired-thumb-file-marked-p, image-dired-delete-marked):
Use above new macro to simplify and improve error handling.
(image-dired-show-all-from-dir): Simplify removing Dired marks.
(image-dired-thumb-update-marks): Avoid triggering above new error
handling.

2 years agoTweak how :override advice is formatted in *Help*
Lars Ingebrigtsen [Sat, 24 Sep 2022 12:06:26 +0000 (14:06 +0200)]
Tweak how :override advice is formatted in *Help*

* lisp/emacs-lisp/nadvice.el (advice--make-single-doc): Format
:overrides specially (bug#57974).
(advice--make-docstring): Put overrides at the front.

2 years agoRename file-name-directory
Lars Ingebrigtsen [Sat, 24 Sep 2022 10:44:44 +0000 (12:44 +0200)]
Rename file-name-directory

* lisp/emacs-lisp/shortdoc.el (file-name):
* doc/lispref/files.texi (Directory Names): Adjust.
* lisp/files.el (file-name-parent-directory): Rename from
`file-name-directory' (bug#58039).

2 years agoEnsure that cus-load doesn't add things twice
Lars Ingebrigtsen [Sat, 24 Sep 2022 10:15:58 +0000 (12:15 +0200)]
Ensure that cus-load doesn't add things twice

* lisp/cus-dep.el (custom-make-dependencies): Use it.

* lisp/custom.el (custom--add-custom-loads): New function.

2 years ago`append' doc string clarification
Lars Ingebrigtsen [Sat, 24 Sep 2022 09:43:04 +0000 (11:43 +0200)]
`append' doc string clarification

* src/fns.c (Fappend): Clarify whether arguments are copied.

2 years agoClarify message-newline-and-reformat doc string
Lars Ingebrigtsen [Sat, 24 Sep 2022 09:36:28 +0000 (11:36 +0200)]
Clarify message-newline-and-reformat doc string

* lisp/gnus/message.el (message-newline-and-reformat): Clarify the
DWIM-ness in the doc string (bug#57986).

2 years ago; * lisp/image/image-dired.el: Improve sectioning.
Stefan Kangas [Sat, 24 Sep 2022 09:10:29 +0000 (11:10 +0200)]
; * lisp/image/image-dired.el: Improve sectioning.

2 years ago; Make 'M-x image-dired' prompt even clearer
Stefan Kangas [Sat, 24 Sep 2022 09:07:45 +0000 (11:07 +0200)]
; Make 'M-x image-dired' prompt even clearer

* lisp/image/image-dired.el (image-dired-show-all-from-dir):
Make prompt even clearer.
Suggested by Eli Zaretskii <eliz@gnu.org>.

2 years agoImprove image-dired-thumbnail-display-external
Stefan Kangas [Sat, 24 Sep 2022 09:06:51 +0000 (11:06 +0200)]
Improve image-dired-thumbnail-display-external

* lisp/image/image-dired.el: (image-dired-external-viewer): Add more
image viewers and slightly re-arrange.
(image-dired-thumbnail-display-external): Correctly handle
external viewers with spaces or flags.

2 years ago* lisp/emacs-lisp/shortdoc.el (file-name): Improve examples.
Stefan Kangas [Sat, 24 Sep 2022 00:15:53 +0000 (02:15 +0200)]
* lisp/emacs-lisp/shortdoc.el (file-name): Improve examples.

2 years agoimage-dired: Use command substitution for tags bindings
Stefan Kangas [Fri, 23 Sep 2022 23:45:54 +0000 (01:45 +0200)]
image-dired: Use command substitution for tags bindings

* lisp/image/image-dired-tags.el
(image-dired-dired-edit-comment-and-tags): Use substitute-command-keys

2 years agoimage-dired: Various code clean ups
Stefan Kangas [Fri, 23 Sep 2022 21:47:23 +0000 (23:47 +0200)]
image-dired: Various code clean ups

* lisp/image/image-dired.el
(image-dired--display-thumb-properties-fun): Delete function.
(image-dired-forward-image): Immediately update header line.  Improve
docstring.
(image-dired-backward-image, image-dired-next-line)
(image-dired-previous-line, image-dired-beginning-of-buffer)
(image-dired-end-of-buffer, image-dired-display-image): Improve
docstring.
(image-dired-comment-thumbnail): Fix interactive declaration.

2 years agoReduce complexity of scroll bar window protection code
Po Lu [Sat, 24 Sep 2022 08:27:42 +0000 (16:27 +0800)]
Reduce complexity of scroll bar window protection code

It turns out my previous theories of why ClientMessages were
generated were wrong, and they are just generated so we can set
finish to X_EVENT_GOTO_OUT to have them delivered immediately.

This allows for the code to be simplified greatly, by not
unpacking pointers to the raw window into the client messages.

* src/xterm.c (x_unprotect_window_for_callback): Return the
window removed from the queue, or nil if none.
(x_scroll_bar_to_input_event)
(x_horizontal_scroll_bar_to_input_event): Use window provided by
x_unprotect_window_for_callback.
(handle_one_xevent): Pass dpyinfo to functions that need it.
(x_free_frame_resources): Remove "first scroll bar request"
code.

* src/xterm.h (struct x_display_info): Likewise.

2 years agoNew Flymake backend using the shellcheck program
Augusto Stoffel [Sat, 17 Sep 2022 16:30:04 +0000 (18:30 +0200)]
New Flymake backend using the shellcheck program

See bug#57884.

* lisp/progmodes/sh-script.el: Require let-alist and subr-x when
compiling.
(sh--json-read): Helper function to deal with possible absence of
json-parse-buffer.
(sh-shellcheck-program, sh--shellcheck-process,
sh-shellcheck-flymake): Variables and function defining a Flymake
backend.
(sh-mode): Add it to 'flymake-diagnostic-functions'.

2 years ago; * src/keyboard.c (Fposn_at_point): Doc fix. (Bug#52092)
Eli Zaretskii [Sat, 24 Sep 2022 06:22:45 +0000 (09:22 +0300)]
; * src/keyboard.c (Fposn_at_point): Doc fix.  (Bug#52092)

2 years agovc-git--pushpull: Restore handling of vc-git-program
Sean Whitton [Fri, 23 Sep 2022 17:43:31 +0000 (10:43 -0700)]
vc-git--pushpull: Restore handling of vc-git-program

* lisp/vc/vc-git.el (vc-git--pushpull): Restore handling of
vc-git-program before recent change: respect a buffer-local value of
vc-git-program, and don't ignore user edits to the git program name
when PROMPT.

2 years ago* lisp/emacs-lisp/eieio.el (defclass): Fix bug#51068
Stefan Monnier [Fri, 23 Sep 2022 21:42:55 +0000 (17:42 -0400)]
* lisp/emacs-lisp/eieio.el (defclass): Fix bug#51068

Accept (defclass <class> <superclasses> (.. <slotname> ..)) without
having to wrap the slot name within parentheses.

2 years agoimage-dired: Rewrite and extend slideshow feature
Stefan Kangas [Fri, 23 Sep 2022 21:12:10 +0000 (23:12 +0200)]
image-dired: Rewrite and extend slideshow feature

* lisp/image/image-dired.el
(image-dired--slideshow-start-timer)
(image-dired--slideshow-stop-timer)
(image-dired--slideshow-show-message): New functions.
(image-dired--slideshow-current-delay): New variable.
(image-dired--slideshow-initial): Delete variable.
(image-dired-slideshow-start): Simplify and ensure we display the
image at start.
* lisp/image/image-dired.el (image-dired--slideshow-stop): Add support
for pausing, and going backwards and forwards during slideshow.

2 years agoimage-dired: Mark two slideshow defuns as internal
Stefan Kangas [Fri, 23 Sep 2022 18:18:17 +0000 (20:18 +0200)]
image-dired: Mark two slideshow defuns as internal

* lisp/image/image-dired.el (image-dired--slideshow-step)
(image-dired--slideshow-stop): Rename from
'image-dired--slideshow-step' and 'image-dired--slideshow-stop'.
Update callers and make old names into obsolete aliases.

2 years agocconv.el: Fix interactive closure bug#51695
Stefan Monnier [Fri, 23 Sep 2022 20:36:16 +0000 (16:36 -0400)]
cconv.el: Fix interactive closure bug#51695

Make cconv.el detect when a closure's interactive form needs to
capture variables from the context and tweak the code accordingly
if so.

* lisp/emacs-lisp/cconv.el (cconv--interactive-form-funs): New var.
(cconv-convert): Handle the case where the interactive form captures
vars from the surrounding context.  Remove left over handling of
`declare` which was already removed from the cconv-analyze` phase.
(cconv-analyze-form): Adjust analysis of interactive forms accordingly.

* lisp/emacs-lisp/oclosure.el (cconv--interactive-helper): New type and
function.
* lisp/simple.el (function-documentation, oclosure-interactive-form):
Add methods for it.

* test/lisp/emacs-lisp/cconv-tests.el
(cconv-tests-interactive-closure-bug51695): New test.

2 years agoMake Gnus respect mode-line-buffer-identification-keymap
Visuwesh [Fri, 23 Sep 2022 16:21:55 +0000 (18:21 +0200)]
Make Gnus respect mode-line-buffer-identification-keymap

* lisp/gnus/gnus-group.el (gnus-group-set-mode-line): Use
'propertized-buffer-identification' to buttonise and fontify the
buffer name.
* lisp/gnus/gnus-sum.el (gnus-set-mode-line):
* lisp/gnus/gnus.el (gnus-mode-line-buffer-identification): Adjust
calls to above.
* lisp/gnus/gnus-srvr.el (gnus-browse-foreign-server): Add missing
'gnus-modeline-buffer-identification' call (bug#57977).

2 years agoMake bounding box of 'image-crop' more noticeable
Visuwesh [Fri, 23 Sep 2022 16:11:25 +0000 (18:11 +0200)]
Make bounding box of 'image-crop' more noticeable

* lisp/image/image-crop.el (image-crop--crop-image-1): Darken the
selected region to make the bounding-box more noticable in images
which are mostly white (bug#58004).

2 years agoDon't overwrite cus-load dependencies
Lars Ingebrigtsen [Fri, 23 Sep 2022 16:06:38 +0000 (18:06 +0200)]
Don't overwrite cus-load dependencies

* lisp/cus-dep.el (custom-make-dependencies): Don't overwrite
elements added by packages (bug#58015).

2 years agoMake loaddefs-gen register parent :groups from defcustom
Lars Ingebrigtsen [Fri, 23 Sep 2022 15:58:41 +0000 (17:58 +0200)]
Make loaddefs-gen register parent :groups from defcustom

* lisp/emacs-lisp/loaddefs-gen.el
(loaddefs-generate--make-autoload): Also register parent :groups from
`defgroup' entries (bug#58015).

2 years agoFix syntax check in python-info-looking-at-beginning-of-defun
kobarity [Fri, 23 Sep 2022 15:39:53 +0000 (17:39 +0200)]
Fix syntax check in python-info-looking-at-beginning-of-defun

* lisp/progmodes/python.el
(python-info-looking-at-beginning-of-defun): Check syntax after moving
to the beginning of line.
* test/lisp/progmodes/python-tests.el (python-nav-beginning-of-defun-6)
(python-end-of-defun-1, python-info-looking-at-beginning-of-defun-3):
New tests (bug#58023).

2 years agoInhibit image-crop when there's overlays
Lars Ingebrigtsen [Fri, 23 Sep 2022 15:34:46 +0000 (17:34 +0200)]
Inhibit image-crop when there's overlays

* lisp/image/image-crop.el (image-crop): Don't mess with overlays,
because they're a pain to reconstruct (bug#58027).

2 years agoDelete the correct region after cropping an image
Lars Ingebrigtsen [Fri, 23 Sep 2022 15:31:23 +0000 (17:31 +0200)]
Delete the correct region after cropping an image

* lisp/image/image-crop.el (image-crop): Delete the correct region
after editing (bug#58027).

2 years agoimage-dired: Disable 'image-map' in thumbnail buffer
Stefan Kangas [Fri, 23 Sep 2022 15:22:47 +0000 (17:22 +0200)]
image-dired: Disable 'image-map' in thumbnail buffer

These bindings are more likely to mess up the buffer than to be
helpful here; image manipulation is better done in the display buffer.

* lisp/image/image-dired.el (image-dired-insert-thumbnail): Disable
`image-map' in thumbnail buffer.

2 years agoUpdate manual for recent image-dired changes
Stefan Kangas [Fri, 23 Sep 2022 15:10:15 +0000 (17:10 +0200)]
Update manual for recent image-dired changes

* doc/emacs/dired.texi (Image-Dired): Update to reflect recent
changes.

2 years ago* lisp/files.el (risky-local-variable): Remove max-specpdl-size.
Mattias Engdegård [Fri, 23 Sep 2022 14:12:29 +0000 (16:12 +0200)]
* lisp/files.el (risky-local-variable): Remove max-specpdl-size.

2 years agoRemove max-specpdl-size overrun test
Mattias Engdegård [Fri, 23 Sep 2022 13:26:13 +0000 (15:26 +0200)]
Remove max-specpdl-size overrun test

* test/src/eval-tests.el (eval-tests--exceed-specbind-limit)
(eval-exceed-specbind-with-signal-hook): Remove test that is
no longer useful, since there is no longer any specpdl limit
to overrun.  (The test still passed but vacuously so, by
hitting the max-lisp-eval-depth limit instead.)
This silences an obsoletion warning.

2 years ago; Fix :type of image-dired-thumbnail-storage
Stefan Kangas [Fri, 23 Sep 2022 14:08:03 +0000 (16:08 +0200)]
; Fix :type of image-dired-thumbnail-storage

* lisp/image/image-dired.el (image-dired-thumbnail-storage): Fix
:type for recent change.

2 years ago* lisp/bookmark.el (bookmark-make-record): Fix thinko.
Michael Albinus [Fri, 23 Sep 2022 14:07:07 +0000 (16:07 +0200)]
* lisp/bookmark.el (bookmark-make-record): Fix thinko.

2 years ago; Fix warnings in --without-x build
Stefan Kangas [Fri, 23 Sep 2022 13:14:17 +0000 (15:14 +0200)]
; Fix warnings in --without-x build

* lisp/image/image-crop.el (image-scaling-factor)
(image-property, image-size, imagep):
* test/src/image-tests.el (image-size, image-mask-p)
(image-metadata): Declare.

2 years agoImprove prompt of 'image-dired' command
Stefan Kangas [Fri, 23 Sep 2022 13:10:33 +0000 (15:10 +0200)]
Improve prompt of 'image-dired' command

* lisp/image/image-dired.el (image-dired-show-all-from-dir):
Improve prompt.

2 years agoRename 'image-dired-db-file' to 'image-dired-tags-db-file'
Stefan Kangas [Fri, 23 Sep 2022 13:01:36 +0000 (15:01 +0200)]
Rename 'image-dired-db-file' to 'image-dired-tags-db-file'

* lisp/image/image-dired.el (image-dired-tags-db-file): Rename
from 'image-dired-db-file'.  Update all uses and make old name
into an obsolete variable alias.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Fri, 23 Sep 2022 12:56:54 +0000 (14:56 +0200)]
Merge from origin/emacs-28

60ac12d21f Fix shaping with bitmap-only fonts on HarfBuzz 5.2.0 (Bug#...
9f65e52362 ; Minor copyedits of elisp.texi

2 years agoFix more toolkit scroll bar window protection issues
Po Lu [Fri, 23 Sep 2022 12:41:24 +0000 (20:41 +0800)]
Fix more toolkit scroll bar window protection issues

* src/xterm.c (handle_one_xevent): Ignore outdated scroll bar
events.
(x_free_frame_resources): Clear protected windows and invalidate
previous scroll bar events.
* src/xterm.h (struct x_display_info): New field
`first_valid_scroll_bar_req'.

2 years agoAutoload wallpaper-set
Stefan Kangas [Fri, 23 Sep 2022 09:50:28 +0000 (11:50 +0200)]
Autoload wallpaper-set

* lisp/image/wallpaper.el (wallpaper-set): Autoload.
* lisp/image-mode.el (wallpaper):
* lisp/image/image-dired.el (wallpaper):
* lisp/thumbs.el (wallpaper): Don't require.

2 years agoSupport Noto Emoji font as fallback
Eli Zaretskii [Fri, 23 Sep 2022 06:36:24 +0000 (09:36 +0300)]
Support Noto Emoji font as fallback

The black-and-white emoji font is back under active development,
see https://github.com/googlefonts/noto-emoji.  So this adds
that font as fallback for systems that don't have the capability
of using color fonts.
* lisp/international/fontset.el (setup-default-fontset): Support
black-and-white Noto Emoji font as fallback for Emoji display.

2 years agoFix shaping with bitmap-only fonts on HarfBuzz 5.2.0 (Bug#57976)
YAMAMOTO Mitsuharu [Fri, 23 Sep 2022 05:17:12 +0000 (14:17 +0900)]
Fix shaping with bitmap-only fonts on HarfBuzz 5.2.0 (Bug#57976)

* src/ftcrfont.c (ftcrhbfont_begin_hb_font): Undo last change for
HarfBuzz 5.2.0.

2 years ago; * lisp/image/wallpaper.el: Fix last commit.
Stefan Kangas [Fri, 23 Sep 2022 03:40:42 +0000 (05:40 +0200)]
; * lisp/image/wallpaper.el: Fix last commit.

2 years agoSupport several new DEs in wallpaper.el
Stefan Kangas [Fri, 23 Sep 2022 01:24:13 +0000 (03:24 +0200)]
Support several new DEs in wallpaper.el

* lisp/image/wallpaper.el (wallpaper--default-commands)
(wallpaper--check-command, wallpaper-command): Add support for Unity,
Pantheon, Budgie, LXQt, and LXDE.  Also add support for Lubuntu,
Xubuntu, and Pop!_OS.

2 years agoimage-dired: Obsolete two unused functions
Stefan Kangas [Thu, 22 Sep 2022 19:52:15 +0000 (21:52 +0200)]
image-dired: Obsolete two unused functions

* lisp/image/image-dired-util.el (image-dired-display-window)
(image-dired-associated-dired-buffer-window): Make obsolete; they are
currently unused.

2 years ago; * Makefile.in: Make install depend on actual-all. Fixes bug#57959.
Gregory Heytings [Thu, 22 Sep 2022 21:54:57 +0000 (23:54 +0200)]
; * Makefile.in: Make install depend on actual-all. Fixes bug#57959.

2 years ago; Minor copyedits of elisp.texi
Eli Zaretskii [Thu, 22 Sep 2022 16:43:15 +0000 (19:43 +0300)]
; Minor copyedits of elisp.texi

* doc/lispref/variables.texi (Setting Generalized Variables):
Improve wording.

2 years agoDon't rewrite `set` to `setq` of lexical variables
Mattias Engdegård [Thu, 22 Sep 2022 12:15:56 +0000 (14:15 +0200)]
Don't rewrite `set` to `setq` of lexical variables

Only perform the rewrite

   (set 'VAR X) -> (setq VAR X)

for dynamic variables, as `set` isn't supposed to affect
lexical vars (and never does so when interpreted).

* lisp/emacs-lisp/byte-opt.el (byte-optimize-set):
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--xx): New.
(bytecomp-tests--test-cases): Add test cases.
* test/lisp/emacs-lisp/bytecomp-resources/warn-variable-set-nonvariable.el:
Remove obsolete test.

2 years agoimage-dired: Improve minor mode docstring
Stefan Kangas [Thu, 22 Sep 2022 12:29:39 +0000 (14:29 +0200)]
image-dired: Improve minor mode docstring

* lisp/image/image-dired-dired.el (image-dired-minor-mode):
Improve docstring.

2 years agoimage-dired: Remove redundant keybindings
Stefan Kangas [Thu, 22 Sep 2022 12:28:35 +0000 (14:28 +0200)]
image-dired: Remove redundant keybindings

* lisp/image/image-dired-dired.el (image-dired-minor-mode-map):
Don't redundantly bind keys that are already bound in dired.

2 years agoFix failing image-dired test
Stefan Kangas [Thu, 22 Sep 2022 12:17:08 +0000 (14:17 +0200)]
Fix failing image-dired test

* test/lisp/image/image-dired-util-tests.el (ert-x, xdg): Require.
(image-dired-thumb-name/): Delete test.
(image-dired-thumb-name/standard)
(image-dired-thumb-name/image-dired)
(image-dired-thumb-name/per-directory): New tests.