]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agopackage-update would always re-install package
Lin Sun [Wed, 28 Sep 2022 11:05:26 +0000 (13:05 +0200)]
package-update would always re-install package

* lisp/emacs-lisp/package.el (package--updateable-packages): fix
version comparison between available packages and archived
packages (bug#58129).

2 years agoFollow #target links in eww without re-rendering
Visuwesh [Wed, 28 Sep 2022 10:59:04 +0000 (12:59 +0200)]
Follow #target links in eww without re-rendering

* lisp/net/eww.el (eww-follow-link): Do a text property search instead
of re-rendering to follow #target links in the same page.  (bug#58118)
(eww-link-keymap): Bind <mouse-2> to eww-follow-link as well.

2 years ago; Fix debugging image-dired-dired-toggle-marked-thumbs
Stefan Kangas [Wed, 28 Sep 2022 10:23:29 +0000 (12:23 +0200)]
; Fix debugging image-dired-dired-toggle-marked-thumbs

* lisp/image/image-dired-dired.el
(image-dired-dired-toggle-marked-thumbs): Fix debugging.

2 years agoimage-dired: End thumbnail file names with ".jpg"
Stefan Kangas [Tue, 27 Sep 2022 22:41:01 +0000 (00:41 +0200)]
image-dired: End thumbnail file names with ".jpg"

* lisp/image/image-dired-util.el (image-dired-thumb-name): Always
end thumbnail name in ".jpg" and simplify naming to just use the
SHA-1 hash.  (Bug#57961)
* test/lisp/image/image-dired-util-tests.el
(image-dired-thumb-name/image-dired): Adjust test for the above
change.
* etc/NEWS: Announce the above change.

2 years agoStandardize XPM files
Stefan Kangas [Tue, 27 Sep 2022 21:51:21 +0000 (23:51 +0200)]
Standardize XPM files

These headers make GraphicsMagick croak with "Improper image header".
Note that the copyright information is already in README.

* etc/images/checked.xpm:
* etc/images/gnus/gnus.xpm:
* etc/images/gnus/gnus-pointer.xpm:
* etc/images/mh-logo.xpm:
* etc/images/unchecked.xpm: Normalize file headers.

2 years agoPort better to C23 bool+true+false keywords
Paul Eggert [Wed, 28 Sep 2022 08:06:10 +0000 (01:06 -0700)]
Port better to C23 bool+true+false keywords

C23 is adding the C++ keywords bool, true, and false;
prefer them to <stdbool.h> if they are available.
* admin/merge-gnulib (GNULIB_MODULES):
Add stdbool, which emulates C23 on pre-C23 platforms.
(AVOIDED_MODULES): Remove stdbool; Gnulib has renamed
this module to stdbool-c99 and nobody uses it so it does
not need to be avoided.
* m4/c-bool.m4: New file, from Gnulib stdbool module.
* lib-src/seccomp-filter.c, src/conf_post.h, src/dynlib.h:
* src/emacs-module.c, src/nsterm.m, src/systhread.h:
* test/src/emacs-module-resources/mod-test.c:
Use the C23 style and use bool without including <stdbool.h>.
The Gnulib stdbool module causes config.h to include stdbool.h
on pre-C23 platforms.
* src/emacs-module.h.in:
Don’t include <stdbool.h> if C23 or later, or if
it has already been included.

2 years agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Wed, 28 Sep 2022 07:29:09 +0000 (00:29 -0700)]
Update from Gnulib by running admin/merge-gnulib

2 years agoMaintaining ChangeLog history: add more details
Sean Whitton [Wed, 28 Sep 2022 00:49:05 +0000 (17:49 -0700)]
Maintaining ChangeLog history: add more details

* admin/notes/repo (Maintaining ChangeLog history): Add more details.
See <https://debbugs.gnu.org/58092#37>.

2 years ago; * lisp/image/image-dired.el: Fix typo.
Stefan Kangas [Tue, 27 Sep 2022 21:28:26 +0000 (23:28 +0200)]
; * lisp/image/image-dired.el: Fix typo.

2 years agoMake image-dired-dired-toggle-marked-thumbs faster
Stefan Kangas [Tue, 27 Sep 2022 21:26:07 +0000 (23:26 +0200)]
Make image-dired-dired-toggle-marked-thumbs faster

* lisp/image/image-dired-dired.el
(image-dired-dired-toggle-marked-thumbs): Don't show progress, since
it makes things slower.

2 years agoLoad compiled "calc-loaddefs", if any
Lin Sun [Tue, 27 Sep 2022 21:14:52 +0000 (23:14 +0200)]
Load compiled "calc-loaddefs", if any

* lisp/calc/calc.el ("calc-loaddefs"): Load the .elc file (if it
exists) (bug#58127).

2 years agoimage-dired: Fix header line when file is missing
Stefan Kangas [Tue, 27 Sep 2022 20:58:31 +0000 (22:58 +0200)]
image-dired: Fix header line when file is missing

* lisp/image/image-dired.el
(image-dired-format-properties-string): Don't error when file has
been deleted.

2 years ago* lisp/files.el (file-backup-file-names): Don't burp if dir doesn't exist
Stefan Monnier [Tue, 27 Sep 2022 19:10:47 +0000 (15:10 -0400)]
* lisp/files.el (file-backup-file-names): Don't burp if dir doesn't exist

2 years agoAdd back useful information from gnus-coding.texi
Stefan Kangas [Tue, 27 Sep 2022 18:01:38 +0000 (20:01 +0200)]
Add back useful information from gnus-coding.texi

* lisp/international/rfc1843.el:
* lisp/net/pop3.el: Improve Commentary by adding back text from
deleted file gnus-coding.texi.

2 years agoRemove gnus-coding.text (bug#58119)
Lars Ingebrigtsen [Tue, 27 Sep 2022 17:31:35 +0000 (19:31 +0200)]
Remove gnus-coding.text (bug#58119)

2 years agoSome tramp-docker.el adaptions
Michael Albinus [Tue, 27 Sep 2022 16:46:28 +0000 (18:46 +0200)]
Some tramp-docker.el adaptions

* lisp/net/tramp-docker.el (tramp-docker--completion-function):
Add ;;;###tramp-autoload cookie.  Make implementation more robust.
(tramp-methods) Use `tramp-default-remote-shell'.

2 years ago; Simplify wallpaper--format-arg with let-alist
Stefan Kangas [Tue, 27 Sep 2022 13:56:22 +0000 (15:56 +0200)]
; Simplify wallpaper--format-arg with let-alist

* lisp/image/wallpaper.el (wallpaper--format-arg): Use let-alist.

2 years ago* etc/NEWS.23: Belatedly announce 'format-spec'.
Stefan Kangas [Tue, 27 Sep 2022 13:42:30 +0000 (15:42 +0200)]
* etc/NEWS.23: Belatedly announce 'format-spec'.

2 years ago; * lisp/image/wallpaper.el (wallpaper--format-arg): Fix typo.
Stefan Kangas [Tue, 27 Sep 2022 13:33:05 +0000 (15:33 +0200)]
; * lisp/image/wallpaper.el (wallpaper--format-arg): Fix typo.

2 years agoDocument the new "XRandR 1.5" value
Stefan Kangas [Tue, 27 Sep 2022 13:29:33 +0000 (15:29 +0200)]
Document the new "XRandR 1.5" value

* src/xfns.c (Fx_display_monitor_attributes_list):
* lisp/frame.el (display-monitor-attributes-list):
* doc/lispref/frames.texi (Multiple Terminals): Document the new
"XRandR 1.5" value.

2 years ago; Fix documentation of imenu access in DocView
Eli Zaretskii [Tue, 27 Sep 2022 13:01:50 +0000 (16:01 +0300)]
; Fix documentation of imenu access in DocView

* lisp/doc-view.el (doc-view-imenu-enabled)
(doc-view--pdf-outline, doc-view-imenu-index): Doc fixes.

* doc/emacs/misc.texi (DocView Navigation): Fix typo and wording.

2 years ago; * src/xfns.c (Fx_window_property): Fix markup.
Po Lu [Tue, 27 Sep 2022 12:04:11 +0000 (20:04 +0800)]
; * src/xfns.c (Fx_window_property): Fix markup.

2 years agoImprove doc of `x-window-property'
Po Lu [Tue, 27 Sep 2022 12:03:08 +0000 (20:03 +0800)]
Improve doc of `x-window-property'

* src/xfns.c (Fx_window_property): Fix errors in doc string and
document where to obtain documentation for standardized window
properties.

2 years agodocview: imenu access to table of contents
Jose A. Ortega Ruiz [Tue, 27 Sep 2022 11:53:24 +0000 (13:53 +0200)]
docview: imenu access to table of contents

* lisp/doc-view.el (doc-view-imenu-enabled): user option to disable
imenu generation.
* lisp/doc-view.el (doc-view--outline-rx):
(doc-view--pdf-outline, doc-view--imenu-subtree, doc-view-imenu-index):
functions implementing the imenu index generation via mutool.
* lisp/doc-view.el (doc-view-imenu-setup, doc-view-mode): setup of the
new functionality in doc-view mode.
* lisp/imenu.el (imenu-submenus-on-top):
(imenu--split-menu): new local variable to optionally inhibit
grouping of entries with children at the top of imenu menus.
* doc/emacs/misc.texi: documentation for the new functionality
(bug#58103).

2 years ago; whitespace: Add test case for read-only buffers (bug#58082)
Richard Hansen [Mon, 26 Sep 2022 06:12:41 +0000 (02:12 -0400)]
; whitespace: Add test case for read-only buffers (bug#58082)

2 years agoert-x: Improve realism of `ert-with-test-buffer-selected'
Richard Hansen [Mon, 26 Sep 2022 21:07:52 +0000 (17:07 -0400)]
ert-x: Improve realism of `ert-with-test-buffer-selected'

* lisp/emacs-lisp/ert-x.el (ert-with-test-buffer-selected): Set
`inhibit-read-only' and `buffer-read-only' to nil when executing the
body to provide a more realistic test environment.

2 years ago* lisp/progmodes/cc-defs.el (c-let*-maybe-max-specpdl-size): Fix glitches
Alan Mackenzie [Tue, 27 Sep 2022 10:02:27 +0000 (10:02 +0000)]
* lisp/progmodes/cc-defs.el (c-let*-maybe-max-specpdl-size): Fix glitches

2 years agoCC Mode: Don't bind max-specpdl-size when it doesn't exist or is obsolete
Alan Mackenzie [Tue, 27 Sep 2022 08:39:05 +0000 (08:39 +0000)]
CC Mode: Don't bind max-specpdl-size when it doesn't exist or is obsolete

This is part of the changes for bug #57911.

* lisp/progmodes/cc-defs.el (c-let*-maybe-max-specpdl-size): New macro.
(c-get-lang-constant): Use the new macro in place of let*.

2 years agoAvoid uninitialized variable warning
YAMAMOTO Mitsuharu [Tue, 27 Sep 2022 03:39:31 +0000 (12:39 +0900)]
Avoid uninitialized variable warning

* src/composite.c (composition_gstring_adjust_zero_width): Simplify
last change with respect to an exit condition.

2 years agoOptimize coordinate translation during event handling
Po Lu [Tue, 27 Sep 2022 02:50:34 +0000 (10:50 +0800)]
Optimize coordinate translation during event handling

These changes noticeably improve turning the mouse wheel on top of
scroll bars etc over slow network connections.

* src/xterm.c (x_dnd_note_self_position, x_dnd_note_self_wheel)
(x_dnd_note_self_drop): Use x_translate_coordinates.
(x_compute_root_window_offset): New function for calculating and
caching root window offsets of edit window.
(x_translate_coordinates): New function.  Use cached values
whenever possible.
(xi_compute_root_window_offset)
(xi_compute_root_window_offset_pinch): New wrappers for XI2
events.
(x_construct_mouse_click, handle_one_xevent): Use
x_translate_coordinates wherever appropriate.
* src/xterm.h (struct x_output): New fields for keeping track of
the root window offset of the edit window.

2 years agoAdjust zero-width grapheme clusters so they are displayed (Bug#50951)
YAMAMOTO Mitsuharu [Tue, 27 Sep 2022 00:20:58 +0000 (09:20 +0900)]
Adjust zero-width grapheme clusters so they are displayed (Bug#50951)

* src/composite.c (composition_gstring_adjust_zero_width): New function.
* src/composite.h: Declare it.
* src/font.c (Ffont_shape_gstring): Use it before putting gstring to cache.

2 years agoFix OBOE in image-dired--with-marked
Stefan Kangas [Tue, 27 Sep 2022 00:14:54 +0000 (02:14 +0200)]
Fix OBOE in image-dired--with-marked

* lisp/image/image-dired.el (image-dired--with-marked): Fix off-by-one
error.

2 years agovc-filter-command-function: Abbreviate default value
Sean Whitton [Mon, 26 Sep 2022 22:15:02 +0000 (15:15 -0700)]
vc-filter-command-function: Abbreviate default value

* lisp/vc/vc-dispatcher.el (vc-filter-command-function): Abbreviate
`(lambda (&rest args) args)' as just `list'.

2 years agoGet rid of default wallpaper-setter constructor
Stefan Kangas [Mon, 26 Sep 2022 19:32:55 +0000 (21:32 +0200)]
Get rid of default wallpaper-setter constructor

* lisp/image/wallpaper.el (wallpaper-setter): Actually get rid of
the default constructor.

2 years agoSet XFCE wallpaper also in single-workspace-mode
Stefan Kangas [Mon, 26 Sep 2022 19:26:50 +0000 (21:26 +0200)]
Set XFCE wallpaper also in single-workspace-mode

This fixes setting the wallpaper on XFCE whether or not the
"/backdrop/single-workspace-mode" setting is true or false.
That XFCE setting controls whether or not the same wallpaper is used
on all workspaces or not.

* lisp/image/wallpaper.el (wallpaper-setter)
(wallpaper-command-args, wallpaper-default-set-function): Allow
using a function for getting the command line arguments.
(wallpaper-xfce-command-args): New function.
(wallpaper--default-setters): Use above new function for XFCE.

2 years agoCC Mode: Handle C++20 concepts
Alan Mackenzie [Mon, 26 Sep 2022 19:16:33 +0000 (19:16 +0000)]
CC Mode: Handle C++20 concepts

* lisp/progmodes/cc-align.el (c-lineup-topmost-intro-cont): Amend so as not to
indent lines following a requires line.

* lisp/progmodes/cc-engine.el (c-forward-primary-expression)
(c-forward-c++-requires-clause): New functions.
(c-forward-declarator): Skip forward over any trailing requires clause.
(c-forward-decl-or-cast-1): Skip requires clauses before and after the type.
Amend the second element of the return list to include information on two
consecutive identifiers in <...>.
(c-looking-at-or-maybe-in-bracelist): Don't recognize braces in requires
expressions as brace lists.
(c-guess-basic-syntax): CASE 5D.7: New case to handle the continuation of a
"concept foo = " line.

* lisp/progmodes/cc-fonts.el (c-basic-matchers-before): Add a new clause to
handle the declaration of a concept.
(c-get-fontification-context): Treat the arglist of a requires construct as a
declaration arglist.

* lisp/progmodes/cc-langs.el (c-equals-nontype-decl-kwds/key)
(c-fun-name-substitute-kwds/key, c-pre-concept-<>-kwds/key): New
c-lang-consts/vars.
(c-constant-key): New c-lang-var.
(c-type-decl-suffix-key): Include "requires" in the keywords matched.

* lisp/progmodes/cc-mode.el (c-fl-decl-start): Fix an off by one error.  Use
equal rather than eq to compare two syntax contexts.

2 years agoDon't auto-resize image if echo area is non-empty
Stefan Kangas [Mon, 26 Sep 2022 19:10:58 +0000 (21:10 +0200)]
Don't auto-resize image if echo area is non-empty

* lisp/image-mode.el (image-fit-to-window): Don't auto-resize
image if there's a message in the echo area.

2 years ago; * lisp/image/wallpaper.el (cl-macs): Require, to avoid warnings.
Eli Zaretskii [Mon, 26 Sep 2022 16:29:47 +0000 (19:29 +0300)]
; * lisp/image/wallpaper.el (cl-macs): Require, to avoid warnings.

2 years agoDisplay a message when wallpaper was set
Stefan Kangas [Mon, 26 Sep 2022 15:41:11 +0000 (17:41 +0200)]
Display a message when wallpaper was set

* lisp/image/wallpaper.el (wallpaper-default-set-function): Display a
message when the wallpaper was successfully set.

2 years agoFix setting the wallpaper in XFCE
Stefan Kangas [Mon, 26 Sep 2022 12:38:25 +0000 (14:38 +0200)]
Fix setting the wallpaper in XFCE

* lisp/image/wallpaper.el  (wallpaper-command-args)
(wallpaper-default-set-function): Support new format specifiers
%S for screen, %W for workspace, and %M for monitor.
(wallpaper--default-setters): Use above new specifiers for XFCE.
(wallpaper--format-arg): New defun broken out from...
(wallpaper-default-set-function): ...here.
(wallpaper--get-height-or-width): Support noninteractive use.
* test/lisp/image/wallpaper-tests.el (wallpaper--format-arg/filename)
(wallpaper--format-arg/filename-hex)
(wallpaper--format-arg/width, wallpaper--format-arg/screen)
(wallpaper--format-arg/monitor, wallpaper--format-arg/workspace):
New tests.

2 years agoRewrite wallpaper.el to use a cl-defstruct
Stefan Kangas [Sun, 18 Sep 2022 09:48:24 +0000 (11:48 +0200)]
Rewrite wallpaper.el to use a cl-defstruct

* lisp/image/wallpaper.el
(wallpaper--default-commands): Delete variable.
(wallpaper-setter): New cl-defstruct.
(wallpaper--default-methods-create): New macro.
(wallpaper--default-setters):
(wallpaper--current-setter): New variables.
(wallpaper--find-setter): New defun to pick a wallpaper-setter.
(wallpaper--find-command, wallpaper--find-command-args):
Use 'wallpaper--find-setter'.
(wallpaper-command): Doc fix.

* test/lisp/image/wallpaper-tests.el
(wallpaper--find-command/return-string)
(wallpaper--find-command-args/return-list)
(wallpaper--image-file-regexp/return-string): New tests.

2 years agoAdd log-edit-summary-separator face (bug#58092)
Protesilaos Stavrou [Mon, 26 Sep 2022 12:41:18 +0000 (15:41 +0300)]
Add log-edit-summary-separator face (bug#58092)

* lisp/vc/log-edit.el (log-edit-summary-separator): Add new face.
(log-edit-font-lock-keywords): Replace hardcoded face attributes with
named face.
* etc/NEWS: Announce the new face.

2 years agoAutoload image-dired-thumbnail-storage :safe property
Stefan Kangas [Mon, 26 Sep 2022 13:36:22 +0000 (15:36 +0200)]
Autoload image-dired-thumbnail-storage :safe property

* lisp/image/image-dired.el (image-dired-thumbnail-storage):
Autoload :safe property.

2 years agoFix (thing-at-point 'url) in eww forms
Lars Ingebrigtsen [Mon, 26 Sep 2022 13:16:16 +0000 (15:16 +0200)]
Fix (thing-at-point 'url) in eww forms

* lisp/net/eww.el (eww-tag-input): Don't claim to have an URL here
(bug#58091).

* lisp/net/shr.el (shr-next-link, shr-previous-link): Search for
shr-tab-stop instead of shr-url so that we can be more general.
(shr-urlify): Mark all links as tabbable-to.

2 years agoRescale images along with text in eww with `C-x C-+'
Lars Ingebrigtsen [Mon, 26 Sep 2022 11:53:10 +0000 (13:53 +0200)]
Rescale images along with text in eww with `C-x C-+'

* lisp/net/eww.el (eww--rescale-images): Also rescale images when
using `C-x C-+' etc (bug#58047).

2 years agoFix percentage width computation in vtable
Lars Ingebrigtsen [Mon, 26 Sep 2022 11:28:30 +0000 (13:28 +0200)]
Fix percentage width computation in vtable

* lisp/emacs-lisp/vtable.el (vtable--compute-width): Fix
percentage computation (bug#58067).

2 years agoKeep point in eww after hitting `g'
Lars Ingebrigtsen [Mon, 26 Sep 2022 11:20:59 +0000 (13:20 +0200)]
Keep point in eww after hitting `g'

* lisp/net/eww.el (eww-retrieve): Keep point after hitting `g'
(bug#58076).

2 years agoFix whitespace-mode in read-only buffers
Lars Ingebrigtsen [Mon, 26 Sep 2022 10:56:07 +0000 (12:56 +0200)]
Fix whitespace-mode in read-only buffers

* lisp/whitespace.el (whitespace--update-bob-eob): Don't bug out
in read-only buffers (bug#58082).

2 years ago; * etc/TODO: Add some new info to the stylistic-sets item.
Eli Zaretskii [Mon, 26 Sep 2022 06:51:14 +0000 (09:51 +0300)]
; * etc/TODO: Add some new info to the stylistic-sets item.

2 years agoMake average width computation on ftcr more permissive (Bug#43058)
YAMAMOTO Mitsuharu [Mon, 26 Sep 2022 00:57:23 +0000 (09:57 +0900)]
Make average width computation on ftcr more permissive (Bug#43058)

* src/ftcrfont.c (ftcrfont_open): Use only non-zero width glyphs for
computing average width.

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.