Stefan Kangas [Mon, 19 Sep 2022 14:54:19 +0000 (16:54 +0200)]
Allow nil value for filter-buffer-substring-function
* lisp/simple.el
(filter-buffer-substring): Support a nil value to be more resilient.
(filter-buffer-substring-function): Doc fix; improve and update for
above change.
Stefan Kangas [Mon, 19 Sep 2022 14:02:28 +0000 (16:02 +0200)]
Support imenu in emacs-news-mode
* lisp/outline.el (outline-imenu-generic-expression): New variable
broken out from...
(outline-mode): ...here.
* lisp/textmodes/emacs-news-mode.el (emacs-news--mode-common): Use
above new variable to add imenu support.
Philipp Stephani [Mon, 19 Sep 2022 11:34:51 +0000 (13:34 +0200)]
Improve check for misleading 'cl-case' cases (Bug#57915).
* lisp/emacs-lisp/cl-macs.el (cl-case): Check that the case is of the
form (quote FOO), not just (quote).
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-case-no-warning): New unit test.
Stefan Kangas [Mon, 19 Sep 2022 09:39:00 +0000 (11:39 +0200)]
Prefer DE specific commands to set wallpaper
* lisp/image/wallpaper.el (wallpaper--default-commands): Rearrange
order to prioritize desktop environment specific commands before
general Wayland commands like "wbg" or even "swaybg". (Bug#57781)
Po Lu [Mon, 19 Sep 2022 01:35:58 +0000 (09:35 +0800)]
Fix GC protection of scroll bar windows
* src/xterm.c (x_atom_refs): Add _EMACS prefix to
vendor-specific scroll-bar atoms.
(handle_one_xevent): Unprotect windows immediately upon
receiving an _EMACS_SCROLLBAR event, instead of waiting for the
event to be put on the keyboard buffer. Reported by martin
rudalics <rudalics@gmx.at>.
Display a help message when building Emacs failed.
* Makefile.in (actual-all): New target, replacing the former 'all'
target.
(advice-on-failure, sanity-check): New targets.
(all): Use the new targets.
(bootstrap-all): New target, identical to 'all' but meant for the
'bootstrap' target in GNUmakefile.
(actual-bootstrap): New target, replacing the former 'bootstrap'
target. Use the 'actual-all' target instead of the 'all' target.
(bootstrap): Use the new targets.
* GNUmakefile (bootstrap): Use the new 'bootstrap-all' target.
OSC escape sequences filter for compilation buffer
* lisp/osc.el (osc-control-seq-regexp): Regexp matching OSC control sequence.
(osc-filter-region): Filter out OSC control sequences from region.
(osc-for-compilation-buffer): Determines what to do with OSC escape
sequences in compilation output.
(osc-compilation-filter): Implement OSC escape sequence handling for
compilation output (bug#57821).
* lisp/osc.el (osc-handlers): Bind osc-window-title-handler to OSC
command 2.
(osc-window-title): Local variable storing string extracted from OSC
command 2.
(osc-window-title-handler): Copy text from OSC command 2 to
osc-window-title (bug#57821).
Extract support of OSC escape sequences from comint
* lisp/comint.el (osc): Now requires osc.el.
(comint-osc-directory-tracker): Alias to osc-directory-tracker.
(comint-osc-hyperlink-handler): Alias to osc-hyperlink-handler.
(comint-osc-hyperlink-map): Alias to osc-hyperlink-map.
(comint-osc-handlers): Alias to osc-handlers.
(comint-osc-hyperlink): Alias to osc-hyperlink.
(comint-osc-process-output): Rewritten to call osc-apply-on-region.
* lisp/osc.el (osc-handlers): Clone comint-osc-handlers.
(osc--marker): Clone comint-osc--marker.
(osc-apply-on-region): Implementation taken from comint-osc-process-output.
(osc-directory-tracker): Clone from comint-osc-directory-tracker.
(osc-hyperlink-map): Clone from comint-osc-hyperlink-map.
(osc-hyperlink): Clone from comint-osc-hyperlink.
(osc-hyperlink--state): Clone from comint-osc-hyperlink--state.
(osc-hyperlink-handler): Clone from comint-osc-hyperlink-handler.
* test/lisp/osc-tests.el (osc): Test osc-apply-region (bug#57821).
Stefan Kangas [Sat, 17 Sep 2022 19:27:38 +0000 (21:27 +0200)]
Make `image-dired-thumb-(height|width)' obsolete
* lisp/image/image-dired.el (image-dired-thumb-width)
(image-dired-thumb-height): Make obsolete.
(image-dired-thumb-size): Clean up and improve docstring.
* lisp/image/image-dired-external.el (image-dired-thumb-size): Use
'image-dired-thumb-size' instead of above obsolete variables.
(image-dired-create-thumb-1): Support %s format specifier for size.
(image-dired-cmd-create-thumbnail-options): Document %s format
specifier.
(image-dired--thumb-size): Rename function from
'image-dired-thumb-size' and make old name into an obsolete alias.
Update all callers.
* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.5.4-pre".
* lisp/net/tramp-adb.el (tramp-methods): Use "%d".
(tramp-adb-handle-directory-files-and-attributes): Fix "." and
".." in listing.
(tramp-adb-handle-file-attributes)
(tramp-adb-handle-directory-files-and-attributes)
(tramp-adb-handle-file-name-all-completions): Pipe "ls" output
through "cat", in order to avoid quoting special characters.
(tramp-adb-maybe-open-connection): Compute args from `tramp-login-args'.
* lisp/net/tramp-compat.el (tramp-compat-replace-regexp-in-region):
New defalias.
* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
Adapt check for proper remote command.
* lisp/net/tramp.el (tramp-methods): Adapt docstring.
(tramp-handle-make-process): Check for adb device if indicated.
(tramp-get-remote-tmpdir): Cache result in temporary connection
property.
* test/lisp/net/tramp-tests.el (tramp-test17-insert-directory)
(tramp-test22-file-times, tramp--test-utf8): Adapt tests.
(tramp--test-shell-file-name): Do not depend on `tramp--test-adb-p'.
(tramp-test46-unload): Ignore autoload functions in
`tramp-file-name' structure tests, since `tramp-file-name-handler'
is also autoloaded in Emacs 29.
* src/dispnew.c (update_frame_1): Don'f flush if tty's
output_buffer_size is non-zero.
* src/sysdep.c (init_sys_modes): Setvbuf depending on the tty's
output_buffer_size.
* src/term.c (Ftty__set_output_buffer_size, Ftty__output_buffer_size):
Low-level interface for setting and retrieving a tty's output buffer
size.
(syms_of_term): Defsubr the new functions.
* src/termchar.h (struct tty_display_info): New member
output_buffer_size.
* stc/NEWS: Describe the change.
* admin/unidata/unidata-gen.el (unidata-file-alist): Add new ranges.
* lisp/international/fontset.el (script-representative-chars): Add
new scripts.
(otf-script-alist): Update from latest version.
(setup-default-fontset): Add new scripts.
* lisp/international/characters.el: Update syntax and category
tables for new characters and scripts.
(char-width-table): Update for changes in Unicode 15.0.
* test/lisp/international/ucs-normalize-tests.el
(ucs-normalize-tests--failing-lines-part1)
(ucs-normalize-tests--failing-lines-part2): Update per the test
results.
* doc/lispref/nonascii.texi (Character Properties): Update Unicode
version number.
Stefan Kangas [Sat, 17 Sep 2022 04:30:41 +0000 (06:30 +0200)]
Merge from origin/emacs-28
320f0cac80 ; * etc/NEWS: Fix typo. 5dbe4fa64a Simplify regexp in make-news-html-file 069ffbda09 * admin/admin.el (make-news-html-file): Set id on correct ... bcc84ac7fe Add version headlines to HTML NEWS export 5d227ae83e ; * etc/NEWS: Fix formatting.
* admin/emake: Return the status code of make when the build fails.
Filter the output of emake *clean. Add three options --no-color
(useful for emake check for example), --no-check (useful for quicker
builds during development) and --no-fast.
Stefan Kangas [Fri, 16 Sep 2022 20:24:20 +0000 (22:24 +0200)]
Accept more wide function signatures in docstrings
* test/lisp/emacs-lisp/bytecomp-tests.el
("warn-wide-docstring-ignore-function-signature.el"): New test.
* lisp/emacs-lisp/bytecomp.el (byte-compile--wide-docstring-p):
Make regexp more allowing to silence warning.
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-ignore-function-signature.el:
New file.
Stefan Kangas [Fri, 16 Sep 2022 19:54:29 +0000 (21:54 +0200)]
image-dired: Add support for PDF files (Bug#26432)
* lisp/image/image-dired.el
(image-dired--file-name-regexp): New function.
(image-dired-display-thumbnail-original-image): Clean up.
(image-dired-display-image): Support visiting PDF files.
* lisp/image/image-dired-dired.el
(image-dired-dired-toggle-marked-thumbs):
* lisp/image/image-dired.el (image-dired-get-thumbnail-image)
(image-dired-show-all-from-dir): Use above new function instead of
'image-file-name-regexp'.
Stefan Kangas [Fri, 16 Sep 2022 19:34:57 +0000 (21:34 +0200)]
image-dired: Print command when debugging
* lisp/image/image-dired-external.el (image-dired-create-thumb-1):
Display command and arguments when debugging.
* lisp/image/image-dired-util.el (image-dired-debug): Rename from
'image-dired-debug-message'.
Stefan Kangas [Fri, 16 Sep 2022 19:11:26 +0000 (21:11 +0200)]
Delete some commented out code in cperl-mode.el
The differences between this and the existing `cperl-ps-print-init'
are that some faces had been moved from italic to bold or vice versa,
and that there were some obsolete or non-existent face names
mentioned. So there is no point to keeping it given that it's been
commented out since 1999.
* lisp/progmodes/cperl-mode.el: Delete code commented out since 1999:
a slightly different, duplicate definition of `cperl-ps-print-init'.
Stefan Monnier [Fri, 16 Sep 2022 18:26:13 +0000 (14:26 -0400)]
Fix last occurrence of `font-lock-reference-face`
Well... except for CC-mode.
* lisp/cedet/semantic/grammar.el (semantic-grammar-mode-keywords-1):
Redirect reference to obsolete `font-lock-reference-face` to
`font-lock-constant-face`.
Stefan Kangas [Fri, 16 Sep 2022 17:33:02 +0000 (19:33 +0200)]
Add version headlines to HTML NEWS export
This allows linking to, e.g. "NEWS.28.html#28.1" to go directly to
those release notes.
* admin/admin.el (admin--org-export-headers-format)
(make-news-html-file): Add XX.Y version headlines with an HTML anchor.
Juri Linkov [Fri, 16 Sep 2022 16:16:10 +0000 (19:16 +0300)]
* lisp/outline.el: Optimize performance of S-TAB (bug#57813)
(outline-hide-subtree): Don't call outline--insert-close-button, because
it's handled by outline--fix-up-all-buttons called from outline-flag-region.
(outline-show-subtree): Don't call outline--insert-open-button, same reason.
(outline--fix-up-all-buttons): Check invisible outlines explicitly instead of
using slow outline--cycle-state.
Stefan Kangas [Fri, 16 Sep 2022 12:17:14 +0000 (14:17 +0200)]
Improve HTML export of NEWS file
* admin/admin.el (admin--org-export-headers-format)
(admin--org-html-postamble): New variables.
(admin--require-external-package): New function.
(make-news-html-file): Improve HTML export.
* lisp/subr.el (list-of-strings-p): Speed up by a factor 4 (approx.)
and don't crash on dotted lists.
* test/lisp/subr-tests.el (test-list-of-strings-p): Extend test.
Stefan Kangas [Fri, 16 Sep 2022 13:16:43 +0000 (15:16 +0200)]
Delete "etc/NEWS*.html" from .gitignore
We actually do want to see it when preparing a release, so that we
don't include it in a tarball by mistake.
* .gitignore: Don't ignore "etc/NEWS*.html".