1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-06 03:40:56 -08:00
Commit graph

159818 commits

Author SHA1 Message Date
Gerd Möllmann
e3b79c641e Fix crash in GC on macOS (bug#57751)
* src/nsterm.m ([EmacsView windowDidMove:]): Initialize input_event.
2022-09-16 07:17:47 +02:00
Peter Münster
7ec31d3222 image-dired: Fix thumbnail options for gm
* lisp/image/image-dired-external.el
(image-dired-cmd-create-standard-thumbnail-options): Fix options for
"gm" (GraphicsMagick).  (Bug#52200)
2022-09-16 02:23:35 +02:00
Stefan Kangas
45459fd73b ; * etc/NEWS: Improve and re-arrange Image-Dired section. 2022-09-16 00:26:26 +02:00
Stefan Kangas
89084a193e Improve image-dired-display-properties-format
* lisp/image/image-dired.el
(image-dired-display-properties-format): Change default format,
improve docstring and add :safe property
2022-09-16 00:08:56 +02:00
Stefan Kangas
c3828d47dd image-dired: Show header line on start
* lisp/image/image-dired.el (image-dired-show-all-from-dir): Update
header line, to ensure that it is immediately visible on start.
2022-09-15 23:36:25 +02:00
Stefan Monnier
c99815fffa combine-change-calls-1: Fix case where body also changes other bufs
* lisp/subr.el (combine-change-calls-1): Only set the current buffer's part
of the `*-change-functions` hooks.
2022-09-15 16:31:18 -04:00
Stefan Kangas
bb76ab015a image-dired: Fix performance bug with mouse click
* lisp/image/image-dired.el
(image-dired--on-file-in-dired-buffer): Move call to
'image-dired-thumb-update-marks' from here...
(image-dired--do-mark-command): ...to here.  Add new optional
argument UPDATE to control calling it.  Update callers.
(image-dired-mouse-toggle-mark-1): Fix performance bug by setting
above new optional argument to nil.  (Bug#53599)
2022-09-15 22:19:00 +02:00
Stefan Kangas
c6fc00f5d7 Make image-dired-toggle-mark-thumb-original-file obsolete
* lisp/image/image-dired.el
(image-dired-toggle-mark-thumb-original-file): Make obsolete.
(image-dired-mouse-toggle-mark-1): Don't use above obsolete
function.
2022-09-15 22:08:19 +02:00
Mattias Engdegård
bfc4393040 Include nil as valid wallpaper-commmand
* lisp/image/wallpaper.el (wallpaper-command):
Include nil in the type since that is a valid value for the variable,
and may be the default value.  This should fix test-custom-opts.
2022-09-15 22:04:26 +02:00
Alan Mackenzie
a057d41c75 CC Mode: Handle C++20 modules
* lisp/progmodes/cc-engine.el (c-before-after-change-check-c++-modules): New
function.
(c-forward-<>-arglist): Add special handling for "import <...>".

* lisp/progmodes/cc-fonts.el (c-preprocessor-face-name): Add extra "fallback"
face after font-lock-reference-face, namely font-lock-constant-face.
(c-cpp-matchers): Don't fontify the <> delimiters for XEmacs in #include <..>.
(c-basic-matchers-before): Add c-font-lock-c++-modules to the C++ value.
(c-forward-c++-module-name, c-forward-c++-module-partition-name)
(c-font-lock-c++-modules): New functions.

* lisp/progmodes/cc-langs.el (c-get-state-before-change-functions)
(c-before-font-lock-functions): Include
c-before-after-change-check-c++-modules in the C++ value of these variables.
(c-module-name-re): New c-lang-const/var.
(c-other-decl-kwds): Add a C++ value "export".
(c-<>-sexp-kwds): Add a new component c-import-<>-kwds.
(c-import-<>-kwds, c-module-kwds): New c-lang-consts.
(c-module-key): New c-lang-const/var.
2022-09-15 19:54:22 +00:00
Stefan Kangas
3c1579697f ; Fix wallpaper-set on TTY
* lisp/image/wallpaper.el (wallpaper-set): Don't check for
'display-graphic-p', to allow setting the wallpaper from a TTY.
2022-09-15 19:25:09 +02:00
Stefan Kangas
4907859ee0 Document MS-Windows support in wallpaper.el
* lisp/image/wallpaper.el: Add MS-Windows to Commentary.
(wallpaper-command, wallpaper-command-args, wallpaper-set):
Document MS-Windows support.
2022-09-15 19:14:38 +02:00
Stefan Kangas
3ba47a0782 Improve error when wallpaper-command is nil
* lisp/image/wallpaper.el (wallpaper-set): Improve the error message
when 'wallpaper-command' is nil.
2022-09-15 18:48:41 +02:00
Stefan Kangas
2e0cde244a Support macOS in wallpaper.el
* lisp/image/wallpaper.el (wallpaper--default-commands)
(wallpaper-command): Support macOS using "osascript".
(wallpaper-set): Display image name when wallpaper-debug is t.
2022-09-15 18:34:35 +02:00
Juri Linkov
471414fe6b Fix outline image icon display (bug#57813)
* lisp/outline.el (outline--make-button-overlay): Don't overwrite
image display with string display when image exists.
(outline--fix-up-all-buttons): Optimize.
2022-09-15 19:30:17 +03:00
Stefan Kangas
99bb6de7e1 ; Silence byte-compiler in wallpaper.el
* lisp/image/wallpaper.el (w32-set-wallpaper): Declare.
2022-09-15 15:44:27 +02:00
Eli Zaretskii
6bcc7a2df7 ; Fix last change in w32fns.c. 2022-09-15 14:59:50 +03:00
Eli Zaretskii
09e93c4daf Implement support for 'wallpaper-set' on MS-Windows
* src/w32fns.c (Fw32_set_wallpaper): New primitive.
(syms_of_w32fns): Defsubr it.
(globals_of_w32fns): Attempt to load SystemParametersInfoW from
its DLL at run time.

* lisp/image/wallpaper.el (wallpaper-set): Support MS-Windows by
calling 'w32-set-wallpaper'.

* etc/NEWS: Update and simplify wording of the 'wallpaper-set'
entry.
2022-09-15 14:51:31 +03:00
Stefan Kangas
6d61d6018c Add rudimentary font-locking to edit-abbrevs-mode
* lisp/abbrev.el (abbrev-table-name): New face.
(edit-abbrevs-mode-font-lock-keywords): New defvar.
(edit-abbrevs-mode): Support font-locking.
2022-09-15 11:27:57 +02:00
Mattias Engdegård
824ae5faee Use eql or eq instead of = in some places
For a switch op to be generated, comparisons must be made using `eq`,
`eql` or `equal`, not `=`.

* lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode):
* lisp/files.el (file-modes-char-to-who, file-modes-char-to-right):
* lisp/international/titdic-cnv.el (tit-process-header):
* lisp/language/ethio-util.el (ethio-input-special-character)
(ethio-fidel-to-tex-buffer):
* lisp/language/lao.el (consonant):
Use `eq` or `eql` instead of `=`.

In these cases either `eq` or `eql` would do and the choice does not
affect the resulting code.  We compare numbers with `eql` and
characters with `eq` as a matter of style.
2022-09-15 09:42:53 +02:00
Mattias Engdegård
3ad2adc48c Simplify and shrink reader buffers
A big on-stack buffer in a potentially long-running function can
interact badly with the GC's conservative scanning of the C stack.
It may make the scanning slower (since the stack frame is big) and
risks accidental retention of objects from stack detritus
(because the buffer isn't cleaned on entry).

* src/lread.c (stackbufsize): Remove.
(read_integer, read_string_literal, read_bool_vector): Use a local
buffer instead of piggy-backing on that in read0.
(read0): Reduce buffer to something suitable for most identifiers and
numbers.
2022-09-15 09:41:15 +02:00
Mattias Engdegård
f941cc76df mapconcat fast path with identity function argument
This makes (mapconcat #'identity SEQ) slightly faster than
(apply #'concat SEQ), which used to be much faster.
Notably, `string-join` benefits from this change as it uses mapconcat.

* src/fns.c (Fmapconcat): Speed up execution when the function
argument is `identity`.
2022-09-15 09:40:08 +02:00
Po Lu
429e61b130 More fixes for XDND proxy support
* src/xterm.c (handle_one_xevent): Check replies against
toplevel, not proxy.
2022-09-15 15:30:47 +08:00
Stefan Kangas
1ccfd3bae2 Use substitute-command-keys in proced-help
* lisp/proced.el (proced-help-string, proced-help): Use
substitute-command-keys.
2022-09-15 09:17:30 +02:00
Eli Zaretskii
48d8543ff1 ; Fix doc string of 'loaddefs-generate'
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Doc fix.
(Bug#57815)
2022-09-15 09:16:41 +03:00
Eli Zaretskii
52a3ba102c Revert "; Fix doc string of 'loaddefs-generate'"
This reverts commit 5fe9a1a85a.
It included unrelated changes.
2022-09-15 09:14:59 +03:00
Eli Zaretskii
5fe9a1a85a ; Fix doc string of 'loaddefs-generate'
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Doc fix.
(Bug#57815)
2022-09-15 09:12:13 +03:00
Stefan Kangas
41551ccbf6 Merge from origin/emacs-28
5543aea1b2 Automate exporting etc/NEWS to HTML
23a91163ed * Makefile.in (uninstall): Remove the *.eln files.  (Bug#5...
2022-09-15 06:30:40 +02:00
Jim Porter
b8e9239b47 Allow using a symbol as an index into an alist in Eshell
* lisp/eshell/esh-var.el (eshell-index-value): If INDEX is a symbol,
use 'assoc' for indexing.

* test/lisp/eshell/esh-var-tests.el (esh-var-test/interp-var-assoc)
(esh-var-test/quoted-interp-var-assoc): Add checks for indexing via
symbol (bug#57787).
2022-09-14 17:27:21 -07:00
Sean Whitton
30ca49c8f6 Use '^' key for detach command bindings
* lisp/tab-bar.el (tab-prefix-map): Move tear-off-window to C-x w ^ f.
Bind tab-window-detach to C-x w ^ t.
* lisp/window.el (window-prefix-map): Bind tab-detach to C-x t ^ f.
2022-09-14 16:03:50 -07:00
Stefan Kangas
8c73ed0ec3 Add image-transform-reset-to-original to manual
* doc/emacs/files.texi (Image Mode):
Add 'image-transform-reset-to-original'.
Suggested by Juri Linkov <juri@linkov.net>.
2022-09-15 00:55:16 +02:00
Stefan Kangas
5798c4aa2a Support fbsetbg in wallpaper.el
* lisp/image/wallpaper.el (wallpaper--default-commands)
(wallpaper-command): Add "fbsetbg".
2022-09-15 00:55:16 +02:00
Augusto Stoffel
a994126968 pcomplete: Generate completions from --help messages
* lisp/pcomplete.el (pcomplete-from-help): New function (and hash
table) to get pcomplete candidates from help messages.
(pcomplete-here-using-help): Helper function to define pcomplete for
simple commands
(pcomplete-completions-at-point): Provide annotation-function and
company-docsig properties.
* lisp/pcmpl-git.el: New file, provides pcomplete for Git.
* lisp/pcmpl-gnu.el: Add pcomplete for awk, gpg and gdb, emacs and
emacsclient.
* lisp/pcmpl-linux.el: Add pcomplete for systemctl and journalctl.
* lisp/pcmpl-rpm.el: Add pcomplete for dnf.
* lisp/pcmpl-unix.el: Add pcomplete for sudo and most commands found
in GNU Coreutils.
* lisp/pcmpl-x.el: Add pcomplete for tex, pdftex, latex, pdflatex,
rigrep and rclone.
* test/lisp/pcomplete-tests.el (pcomplete-test-parse-gpg-help,
pcomplete-test-parse-git-help): Tests for the new functions.
2022-09-14 21:58:04 +02:00
Augusto Stoffel
05971d2b8d ; * src/emacs.c (usage_message): Remove stray tabs. 2022-09-14 21:21:33 +02:00
Eli Zaretskii
7e69230171 ; * lisp/image/image-crop.el (image-elide, image-crop): Doc fixes. 2022-09-14 21:37:50 +03:00
Lars Ingebrigtsen
b525f201ba Allow specifying the color to use in image-elide
* lisp/image/image-crop.el (image-crop-elide-command): Adjust to
allow specifying the color.
(image-elide): Prompt for a color.
(image-crop--crop-image-update): Pass the color along.
2022-09-14 20:21:54 +02:00
Stefan Kangas
5543aea1b2 Automate exporting etc/NEWS to HTML
* admin/admin.el (make-news-html-file): New function.
* .gitignore: Ignore generated "etc/NEWS*.html" file.
2022-09-14 18:42:10 +02:00
Lars Ingebrigtsen
0df76e3e71 Make image-crop variables into user options
* lisp/image/image-crop.el (image-crop): New group.
(image-crop-crop-command, image-crop-resize-command)
(image-crop-elide-command, image-crop-crop-command): Make into
defcustoms.
2022-09-14 18:33:33 +02:00
Stefan Kangas
9148892768 Support hsetroot in wallpaper.el
* lisp/image/wallpaper.el (wallpaper--default-commands)
(wallpaper-command): Add "hsetroot".
2022-09-14 18:17:42 +02:00
Stefan Kangas
80c516bbc8 ; Fix typo in wallpaper--default-commands
* lisp/image/wallpaper.el (wallpaper--default-commands): Fix typo.
2022-09-14 18:13:06 +02:00
Stefan Kangas
0c9d32b59e ; * etc/NEWS: Fix typo. 2022-09-14 18:06:23 +02:00
Lars Ingebrigtsen
6a22f7e5b7 Regenerated ldefs-boot.el 2022-09-14 17:54:05 +02:00
Lars Ingebrigtsen
a5e1565815 Speed up Emacs build by autoloading vc-git-annotate-switches-safe-p
* lisp/vc/vc-git.el (vc-git-annotate-switches-safe-p): Put the
definition into the loaddefs file.
2022-09-14 17:53:41 +02:00
Lars Ingebrigtsen
15f42f193b Fix image-mode.el compilation
* lisp/image/image-crop.el (text-property-search): Require.
2022-09-14 16:04:52 +02:00
Lars Ingebrigtsen
576eba77d3 Make image cropping work in image-mode buffers
* lisp/image-mode.el (image-mode): Update the buffer text after
cropping (bug#57793).
2022-09-14 16:04:52 +02:00
Lars Ingebrigtsen
997284d2a5 Don't alter the buffer contents in image-crop by default
* lisp/image/image-crop.el (image-crop-buffer-text-function):
Allow modes to alter the textual representation.
(image-crop): Delete the complete image data without assuming it's
all on one line (which isn't the case in image-mode, for instance).
(image-crop--crop-image-update, image-crop--insert-image-data):
Use image-crop-buffer-text-function.
(image-crop--default-buffer-text): New default action -- don't
alter the buffer contents (bug#57793).
2022-09-14 16:04:52 +02:00
Mattias Engdegård
cba866599c Raise default max-specpdl-size and max-lisp-eval-depth
Recent changes have caused bootstrapping to fail for certain
configurations, and it was likely getting close to the limits
for others.  This change raises the limits to those previously
used when configured for nativecomp:

  max-specpdl-size raised from 1800 to 2500
  max-lisp-eval-depth raised from 800 to 1600

* src/eval.c (init_eval_once): Raise limits.
* doc/lispref/eval.texi (Eval):
* doc/lispref/variables.texi (Local Variables): Document new values.
2022-09-14 15:59:43 +02:00
Stefan Kangas
37fe0cd358 Rename image transform commands to be less confusing
* lisp/image-mode.el
(image-transform-original): Rename from this...
(image-transform-reset-to-original): ...to this.  Make old name
into an obsolete function alias and update all callers.
(image-transform-reset): Rename from this...
(image-transform-reset-to-initial): ...to this.  Make old name
into an obsolete function alias and update all callers.
(Bug#51451)
* doc/emacs/files.texi (Image Mode): Update for above change.
2022-09-14 15:43:39 +02:00
Stefan Kangas
600bb2d45f ; * doc/emacs/files.texi (Image Mode): Improve indexing. 2022-09-14 15:42:38 +02:00
Lars Ingebrigtsen
4209a4d3ae Remove the save-match-data from shell-command
* lisp/simple.el (shell-command): Remove save-match-data, since
we're (in many cases) altering the match data earlier in the
function anyway (bug#57795).
2022-09-14 15:26:30 +02:00