F. Jason Park [Sun, 31 Dec 2023 00:27:08 +0000 (16:27 -0800)]
Use format-prompt in erc-select-read-args
* lisp/erc/erc-button.el (erc-button-cmd-KICK, erc-button-cmd-MSG):
Use `read-string' instead of `read-from-minibuffer'.
* lisp/erc/erc.el (erc-select-read-args): Use `format-prompt', which
isn't normally available in Emacs 27 without Compat.
F. Jason Park [Sun, 31 Dec 2023 00:39:18 +0000 (16:39 -0800)]
Restore predicate for detecting date stamps in ERC
* etc/ERC-NEWS: Mention function `erc-stamp-inserting-date-stamp-p'.
* lisp/erc/erc-stamp.el (erc-stamp-inserting-date-stamp-p): New
function for third parties to detect whether the message being
inserted is a date stamp. Date stamps as independent messages were
originally introduced as part of bug#60936.
F. Jason Park [Sun, 31 Dec 2023 01:09:17 +0000 (17:09 -0800)]
Fix regression in erc-keep-place-indicator-mode
* lisp/erc/erc-goodies.el (erc-keep-place): Revert portion of 65735efdca0 "Improve multi-window erc-keep-place-indicator-mode" that
skipped modifying `window-prev-buffers' when the indicator's minor
mode was enabled.
* test/lisp/erc/erc-scenarios-keep-place-indicator.el: Modify test to
assert that point's place is preserved after switching away from a
buffer with the indicator enabled.
* test/lisp/erc/resources/keep-place/follow.eld: Update.
This feature was originally introduced by bug#59943.
Alan Mackenzie [Sun, 31 Dec 2023 11:02:50 +0000 (11:02 +0000)]
CC Mode. Preserve space syntax-table props in open strings
This fixes bug#68111, allowing, e.g., backward-kill-word to
work properly.
* lisp/progmodes/cc-mode.el (c-clear-string-fences): On an open
string which isn't followed by another string, remove the
syntax-table properties just from template delimiters rather
than setting the syntax-table properties of all the string to
punctuation.
Harald Jörg [Sat, 30 Dec 2023 20:50:22 +0000 (21:50 +0100)]
; cperl-mode.el: Improve discoverability of cperl-file-styles
* lisp/progmodes/cperl-mode.el (cperl-indentation-details):
Mention the option `cperl-file-style' in the docstring.
(cperl-file-style): Describe the available styles, and move the
option to the group `cperl-indentatino-details'.
Stefan Kangas [Sat, 30 Dec 2023 16:56:39 +0000 (17:56 +0100)]
Add `text` to `finder-known-keywords`
`finder-known-keywords` is "supposed to correspond to top-level
customization groups". However, the customize group "wp" is now
deprecated in favor of "text".
* lisp/finder.el (finder-known-keywords): Add new "text" keyword.
Deprecate the "wp" keyword.
Alan Third [Mon, 9 Oct 2023 21:21:05 +0000 (22:21 +0100)]
Simplify Objective C autorelease pool handling
* src/emacs.c: Remove ns_pool.
(main): Replace ns_pool stuff with call to ns_init_pool.
(Fkill_emacs): The pools are drained automatically when the
application exits, so it's probably not worth draining the pool here.
(decode_env_path): No longer required as this is handled by
`outerpool' defined in nsterm.m.
* src/nsterm.h:
* src/nsterm.m (ns_init_pool): New function.
Ihor Radchenko [Sat, 30 Dec 2023 10:31:51 +0000 (11:31 +0100)]
find-buffer-visiting: Fix test breakage introduced in b7a737ef49
* lisp/files.el (find-buffer-visiting): Fix code branch checking for
buffers referring to the same file number. We should check the found
buffer with the file number, not current.
* src/buffer.h: Remove case_fold_search_ buffer object slot.
* src/buffer.c (bset_case_fold_search): Remove - no longer needed.
(init_buffer_once): Remove removed buffer slot init.
(syms_of_buffer): Use DEFVAR_LISP to define `case-fold-search' and
declare it buffer-local.
* src/minibuf.c (syms_of_minibuf): Remove DEFSYM call for
`case-fold-search' symbol. It now lives in `syms_of_buffer'.
* src/editfns.c (Fcompare_buffer_substrings):
(Fchar_equal):
* src/search.c (looking_at_1):
(string_match_1):
(search_command):
(Fre__describe_compiled): Adjust C queries to `case-fold-search' value
to use C globals instead of BVAR macro.
* doc/lispref/internals.texi (Buffer Internals): Do not list
`case_fold_search' slot.
See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66117#259
When used as buffer slot, let-binding `case-fold-search' would scale
with the number of live buffers and can be slow. This change makes
let-binding much faster at the cost of slightly slower `set-buffer'.
Ihor Radchenko [Sun, 8 Oct 2023 08:48:42 +0000 (11:48 +0300)]
Improve performance of `find-buffer-visiting' (bug#66117)
* src/buffer.c (Fget_truename_buffer): Expose `get_truename_buffer' to
Elisp.
(Ffind_buffer): New subr searching for a live buffer with a given
value of buffer-local variable.
(syms_of_buffer): Register the new added subroutines.
* src/filelock.c (lock_file): Use the new `Fget_truename_buffer' name.
* src/lisp.h:
* test/manual/etags/c-src/emacs/src/lisp.h: Remove no-longer-necessary
extern declarations for `get_truename_buffer'.
* lisp/files.el (find-buffer-visiting): Refactor, using subroutines to
search for buffers instead of slow manual Elisp iterations.
org-remember has been removed from Org mode proper and then from
org-contrib 10 years ago in
https://git.sr.ht/~bzg/org-contrib/commit/be8736195e
(Bug#68076)
* java/org/gnu/emacs/EmacsService.java (getEmacsView)
(getLocationOnScreen, getClipboardManager)
(requestDirectoryAccess): Replace manual synchronization within
Runnable objects by usage of FutureTask.
(syncRunnable): Accept FutureTask<V> in place of Runnables, and
obtain and return results from calls to its get method.
We deliberately don't silence these warnings, so that a user who loads
the mode without having the grammar installed sees the warning and
realizes the problem in time to fix it.
Sean Whitton [Fri, 29 Dec 2023 17:41:35 +0000 (17:41 +0000)]
pcomplete--entries: In predicate, check file exists
* lisp/pcomplete.el (pcomplete--entries): In the predicate passed to
completion-table-with-predicate, when PREDICATE is nil, take ourselves
to be responsible for calling file-exists-p (bug#67661).
Vincent Belaïche [Fri, 29 Dec 2023 11:11:51 +0000 (12:11 +0100)]
Fix 13 years old bug#5852 !
Sometimes recalculating a cell does not change its value, however it
still have to be written to the data area when the reference list is
changed
* lisp/ses.el (ses-cell-set-formula): Fix bug#5852, at last !
* test/lisp/ses-tests.el
(ses-set-formula-write-cells-with-changed-references): Rename test
from ses-bug5852, do not expect failure, and update description.
Vincent Belaïche [Fri, 29 Dec 2023 11:29:20 +0000 (12:29 +0100)]
Simplify test ses-bug5852
* test/lisp/ses-tests.el (ses-bug5852): Siumplify test to
demonstrate that the bug is not connected to yanking, but has to
do with ses-cell-set-formula.
Stefan Kangas [Fri, 29 Dec 2023 10:24:48 +0000 (11:24 +0100)]
Don't recommend using `cperl-hairy`
Enabling `cperl-hairy` makes cperl-mode break many Emacs conventions
and can be confusing to new users. Let's not say that this is the
"recommended mode of use", instead leaving it up to the user.
* lisp/progmodes/cperl-mode.el (cperl-mode): Don't recommend using
`cperl-hairy'.
Po Lu [Fri, 29 Dec 2023 06:58:19 +0000 (14:58 +0800)]
Obey USE_MY_METRICS in compound glyphs
* src/sfnt.c (struct sfnt_compound_glyph_context): New fields
holding the positions of both phantom points.
(sfnt_decompose_compound_glyph): New argument METRICS_RETURN;
return the metrics of components with USE_MY_METRICS within this
field.
(sfnt_decompose_glyph): New argument METRICS_RETURN, which
serves the same purpose.
(sfnt_build_glyph_outline): Apply glyph advance and origin
distortion to METRICS, and return the metrics as altered by
compound glyphs in there.
(sfnt_lookup_glyph_metrics): Trim away two unused parameters,
PIXEL_SIZE and HEAD, whose functionality has been superseeded by
sfnt_scale_metrics and the implicit scaling the interpreter
performs.
(sfnt_interpret_compound_glyph_2): Save phantom points within
fields provided to that end in CONTEXT.
(sfnt_interpret_compound_glyph_1): Save and source phantom
points for each glyph to and from the context.
(sfnt_test_get_metrics, main): Adjust tests correspondingly.
* src/sfnt.h: Update prototypes.
* src/sfntfont.c (sfntfont_get_metrics): Remove obsolete
parameters.
(sfntfont_get_glyph_outline): Don't change temp by the metrics
distortions, which is now the task of sfnt_decompose_glyph.
F. Jason Park [Thu, 28 Dec 2023 02:44:29 +0000 (18:44 -0800)]
Sideline implied invisible-intangible coupling in ERC
* etc/ERC-NEWS: Add entry explaining removal of automatic `intangible'
propertizing of t-valued `invisible' messages.
* lisp/erc/erc.el (erc--insert-invisible-as-intangible-p): New flag
variable, a temporary escape hatch to regain pre-5.6 behavior
involving the modification of certain `invisible' messages.
(erc--insert-line): Gate unfavorable behavior behind
`erc--insert-invisible-as-intangible-p' flag. Add comment clarifying
deferred initialization of `insert-position', which was part of the
many changes introduced as part of bug#60936.
F. Jason Park [Sun, 24 Dec 2023 20:21:49 +0000 (12:21 -0800)]
Move ERC test utilities to common file
* lisp/erc/erc-common.el (erc--define-catalog): Update name of
reference to convenience command now located in `erc-tests-common'.
* test/lisp/erc/erc-button-tests.el: Require common test-util library
`erc-tests-common', located under test/lisp/erc/resources.
; (erc-button-alist--url,
; erc-button-tests--erc-button-alist--function-as-form,
; erc-button-tests--erc-button-alist--nil-form,
; erc-button--display-error-notice-with-keys): Use common helper
; `erc-tests-common-init-server-proc' from test-utils library.
* test/lisp/erc/erc-fill-tests.el: Require `erc-tests-common'.
(erc-fill-tests--wrap-populate): Use helper
`erc-tests-common-init-server-proc'.
(erc-fill-tests--save-p): Remove. See replacement
`erc-tests-common-snapshot-save-p' in erc-tests-common.
(erc-fill-tests--graphic-dir): Add trailing slash.
(erc-fill-tests--compare): Move body to generalized utility
`erc-tests-common-snapshot-compare' in erc-tests-common.
* test/lisp/erc/erc-goodies-tests.el: Require `erc-tests-common'.
(erc--get-inserted-msg-beg/readonly,
erc--get-inserted-msg-end/readonly,
erc--get-inserted-msg-bounds/readonly): Move here from erc-tests.el.
* test/lisp/erc/erc-networks-tests.el: Load `erc-tests-common'.
(erc-networks-tests--create-live-proc): Defer to
`erc-tests-common-init-server-proc' and drop optional buffer param.
(erc-networks-tests--clean-bufs): Defer to
`erc-tests-common-kill-buffers'.
(erc-networks--rename-server-buffer--existing--live): Call
`erc-networks-tests--create-live-proc' in server buffer.
* test/lisp/erc/erc-scenarios-internal.el: Load `erc-tests-common'.
(erc-scenarios-internal--run-graphical-all): Use
`erc-tests-common-create-subprocess' to create process.
* test/lisp/erc/erc-scenarios-sasl.el
(erc-scenarios-sasl--plain-fail): Silence error message.
* test/lisp/erc/erc-stamp-tests.el: Require `erc-tests-common'.
(erc-stamp-tests--insert-right, erc-timestamp-intangible--left): Use
`erc-tests-common-init-server-proc'.
(erc-tests--assert-get-inserted-msg/stamp,
erc-stamp-tests--assert-get-inserted-msg/stamp): Move from
erc-tests.el, renaming to latter.
(erc--get-inserted-msg-beg/stamp,
erc--get-inserted-msg-beg/readonly/stamp,
erc--get-inserted-msg-end/stamp,
erc--get-inserted-msg-end/readonly/stamp,
erc--get-inserted-msg-bounds/stamp,
erc--get-inserted-msg-bounds/readonly/stamp): Move here from
erc-tests.el.
* test/lisp/erc/erc-tests.el: Require `erc-tests-common'.
(erc-with-server-buffer): Use renamed test-helper utility
`erc-tests-common-init-server-proc'.
(erc-tests--send-prep, erc-tests--set-fake-server-process): Move to
`erc-tests-common' library and rename to
`erc-tests-common-prep-for-insertion' and
`erc-tests-common-init-server-proc', respectively.
; (erc-hide-prompt, erc--refresh-prompt,
; erc-setup-buffer--custom-action, erc--parsed-prefix,
; erc--update-channel-modes, erc--channel-modes,
; erc--channel-modes/graphic-p, erc-ring-previous-command): Use
; `erc-tests-common-prep-for-insertion' instead of
; `erc-tests--send-prep', and use `erc-tests-common-init-server-proc'
; instead of `erc-tests--set-fake-server-process'.
(erc-tests--with-process-input-spy): Move to `erc-tests-common' and
rename `erc-tests-common-with-process-input-spy'.
; (erc--check-prompt-input-functions, erc-send-current-line,
; erc--check-prompt-input-for-multiline-blanks,
; erc-send-whitespace-lines): Use renamed
; `erc-tests-common-with-process-input-spy' and
; `erc-tests-common-init-server-proc'.
; (erc-process-input-line): Use renamed
; `erc-tests-common-init-server-proc'.
(erc-tests--get-inserted-msg-setup,
erc-tests--assert-get-inserted-msg,
erc-tests--assert-get-inserted-msg/basic,
erc-tests--assert-get-inserted-msg-readonly-with): Move to
`erc-tests-common' and rename with "common" prefix, using single
instead of double hyphen.
(erc-tests--assert-get-inserted-msg/stamp): Move to `erc-stamp-tests'
and rename with "stamp" prefix.
(erc--get-inserted-msg-beg/stamp,
erc--get-inserted-msg-beg/readonly/stamp,
erc--get-inserted-msg-end/stamp,
erc--get-inserted-msg-end/readonly/stamp,
erc--get-inserted-msg-bounds/stamp,
erc--get-inserted-msg-bounds/readonly/stamp): Move to
`erc-stamp-tests'.
(erc--get-inserted-msg-beg/readonly,
erc--get-inserted-msg-end/readonly,
erc--get-inserted-msg-bounds/readonly): Move to `erc-goodies-tests'.
; (erc--get-inserted-msg-beg/basic,
; erc--get-inserted-msg-end/basic,
; erc--get-inserted-msg-bounds/basic): Use common helpers.
; (erc--route-insertion): Use renamed helper functions
; `erc-tests-common-with-process-input-spy' and
; `erc-tests-common-init-server-proc'.
(erc-tests--make-server-buf): Move to `erc-common-tests' and rename
with "common" prefix.
(erc-tests--make-client-buf): Remove unused function without supplying
replacement.
; (erc-handle-irc-url): Use renamed `erc-tests-common-make-server-buf'
; utility function.
; (erc-tests--assert-printed-in-subprocess): Use helper from common lib
; `erc-tests-common-create-subprocess code' to do the heavy lifting.
(erc-tests--string-to-propertized-parts,
erc-tests-pp-propertized-parts): Move to `erc-tests-common' and rename
with "common" prefix.
* test/lisp/erc/resources/erc-tests-common.el: New file containing
helper utilities and fixtures used by multiple files in test/lisp/erc.
F. Jason Park [Sat, 23 Dec 2023 23:23:44 +0000 (15:23 -0800)]
Allow selecting graphical ERC tests manually
* test/lisp/erc/erc-fill-tests.el
(erc-fill-wrap--monospace, erc-fill-wrap--merge,
erc-fill-wrap-tests--merge-action,
erc-fill-wrap-tests--merge-action/indicator-pre,
erc-fill-wrap-tests--merge-action/indicator-post,
erc-fill-line-spacing, erc-fill-wrap-visual-keys--body,
erc-fill-wrap-visual-keys--prompt, erc-fill--left-hand-stamps): Tag as
:erc--graphcial.
* test/lisp/erc/erc-scenarios-internal.el
(erc-scenarios-internal--run-interactive-all): New test to assist ERC
contributors in -jN parallel runs.
* test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el
(erc-scenarios-scrolltobottom--relaxed): Tag as :erc--graphical.
* test/lisp/erc/erc-scenarios-scrolltobottom.el
(erc-scenarios-scrolltobottom--normal,
erc-scenarios-scrolltobottom--all): Tag as :erc--graphical.
* test/lisp/erc/erc-scenarios-status-sidebar.el
(erc-scenarios-status-sidebar--nickbar): Tag as :erc--graphical.
* test/lisp/erc/erc-tests.el (erc--channel-modes/graphic-p): Tag as
:erc--graphical.
* test/lisp/erc/resources/base/local-modules/first.eld: Timeouts.
* test/lisp/erc/resources/erc-scenarios-common.el
(erc-scenarios-common--graphical-p): New variable.
(erc-scenarios-common--make-bindings): Don't enable
`inhibit-interaction' when interactive. Set
`erc-scenarios-common--graphical-p' flag when
`:erc--graphical' tag present and running interactively.
(erc-scenarios-common-with-cleanup): Account for variable
`erc-scenarios-common--graphical-p'.
(erc-scenarios-common-scrolltobottom--normal): Turn off
`erc-scrolltobottom-mode' when test finishes so as not to pollute when
running multiple interactive tests.
; * test/lisp/erc/resources/join/network-id/barnet.eld: Timeouts.
F. Jason Park [Sun, 24 Dec 2023 19:49:26 +0000 (11:49 -0800)]
Replace erc--get-inserted-msg-bounds with functions
* lisp/erc/erc-fill.el (erc-fill--wrap-rejigger-region): Call
`erc--get-inserted-msg-end' instead of `erc--get-inserted-msg-bounds'
with `end' arg.
* lisp/erc/erc-truncate.el (erc-truncate-buffer-to-size): Call
`erc--get-inserted-msg-beg' with `point' instead of
`erc--get-inserted-msg-bounds' with `beg' arg.
* lisp/erc/erc.el (erc--get-inserted-msg-beg-at,
erc--get-inserted-msg-end-at): New macros.
(erc--get-inserted-msg-beg, erc--get-inserted-msg-end): New functions.
(erc--get-inserted-msg-bounds): Convert to function with different
signature, and refactor. This was introduced for the yet unreleased
5.6 (Emacs 30) by bug#60936.
(erc--get-inserted-msg-prop): Use `erc--get-inserted-msg-beg' instead
of `erc--get-inserted-msg-bounds' with `beg' arg.
(erc--delete-inserted-message): Update call site of
`erc--get-inserted-msg-bounds' to match new signature.
(erc-cmd-CLEAR): Use `erc--get-inserted-msg-beg' instead of
`erc--get-inserted-msg-bounds' with `beg' arg.
* test/lisp/erc/erc-scenarios-match.el
(erc-scenarios-match--stamp-right-fools-invisible): Call
`erc--get-inserted-msg-end' instead of `erc--get-inserted-msg-bounds'.
* test/lisp/erc/erc-tests.el (erc-tests--get-inserted-msg-setup,
erc-tests--assert-get-inserted-msg,
erc-tests--assert-get-inserted-msg/basic,
erc-tests--assert-get-inserted-msg/stamp,
erc-tests--assert-get-inserted-msg-readonly-with): New helper
functions.
(erc--get-inserted-msg-beg/basic, erc--get-inserted-msg-beg/readonly,
erc--get-inserted-msg-beg/stamp,
erc--get-inserted-msg-beg/readonly/stamp,
erc--get-inserted-msg-end/basic, erc--get-inserted-msg-end/stamp,
erc--get-inserted-msg-end/readonly,
erc--get-inserted-msg-end/readonly/stamp,
erc--get-inserted-msg-bounds/readonly,
erc--get-inserted-msg-bounds/stamp,
erc--get-inserted-msg-bounds/readonly/stamp): New tests.
(erc--get-inserted-msg-bounds, erc--get-inserted-msg-bounds/basic):
Move `beg' and `end' cases to separate test variants and rename former
to latter.
* lisp/erc/erc-goodies.el (erc-keep-place-indicator-follow): Describe
condition causing an indicator update.
(erc--keep-place-indicator-on-window-configuration-change,
erc--keep-place-indicator-on-window-buffer-change): Rename former to
latter, add required WINDOW parameter, and don't move indicator if
buffer appears in multiple windows. Also, don't bother checking
whether either buffer is a mini because the manual says window change
functions don't run for minibuffer replacements.
(erc--keep-place-indicator-setup): Hook on
`window-buffer-change-functions' instead of
`window-configuration-change-hook'.
(erc-keep-place-mode, erc-keep-place-disable): Remove member from
`window-buffer-change-functions' instead of
`window-configuration-change-hook'.
(erc-keep-place): Use `visible' FRAME arg of `get-buffer-window'.
Don't twiddle `window-prev-buffers' when
`erc-keep-place-indicator-mode' is non-nil. This feature was
originally introduced by bug#59943.
* test/lisp/erc/erc-goodies-tests.el
(erc-goodies-tests--assert-kp-indicator-on,
erc-goodies-tests--assert-kp-indicator-off): Update hook name.
* test/lisp/erc/erc-scenarios-keep-place-indicator.el: New file.
* test/lisp/erc/resources/keep-place/follow.eld: New file.
It's not correct, breaks tests. I declare it impossible to make C-M-i
use of 'try-completion' behave sanely with LSP in its current state.
YMMV. Use a completion tooltip, like Company.
João Távora [Tue, 26 Dec 2023 13:47:29 +0000 (07:47 -0600)]
Eglot: Make 'try-completion' less broken
The 'try-completion' completion operation, used mostly in vanilla
'completion-at-point' invoked with C-M-i is close to impossible to get
right in LSP because of the arbitrary edits handled in
':exit-function'.
When this operation is invoked on the table, returning the pattern
argument unchanged somehow (TM) makes a sole completion show the
*Completions* buffer, where selecting it will recover context
necessary for `:exit-function' and call that function. It doesn't
break any other cases I know, and that's good enough for now.
https://github.com/joaotavora/eglot/issues/1339
* lisp/progmodes/eglot.el (eglot-completion-at-point): Return pattern
when 'try-completion' is invoked.
Po Lu [Tue, 26 Dec 2023 06:07:58 +0000 (14:07 +0800)]
Consistently round glyph advances in the SFNT font backend
* src/sfnt.h (SFNT_ROUND_FIXED): New macro.
* src/sfntfont.c (sfntfont_get_glyph_outline): Don't apply
advance width distortion before the glyph is instructed or
decomposed. Round advance width as measured between both
phantom points subsequent to instruction code execution.
(sfntfont_draw): Don't take the advance's ceiling when advancing
origin point.
then completion still fails, because the 'try-completion' call in
eglot-completion-at-point will just return complete to "count_ones"
and Emacs doesn't consider this a completion "exit", so it'll
completely ignore the exit function.
I think 'try-completion' (and 'test-completion') simply can't be used
here (for one, they obey styles, and styles are off-limits in LSP),
but I'll leave that for another commit.
Jared Finder [Sat, 16 Dec 2023 20:10:03 +0000 (12:10 -0800)]
Fix mouse clicks on directory line in Dired
The option 'dired-kill-when-opening-new-dired-buffer' should be
also honored when clicking the mouse to kill prev buffer.
* lisp/dired.el (dired--make-directory-clickable): Call
'dired--find-possibly-alternative-file' instead of 'dired', in
the click callback. (Bug#67856)
Eli Zaretskii [Mon, 25 Dec 2023 12:59:26 +0000 (14:59 +0200)]
Fix 'split-root-window-right' and 'split-root-window-below'
* lisp/window.el (split-root-window-right)
(split-root-window-below): Fix the 'interactive' spec to avoid
misbehaving when invoked with no prefix argument. (Bug#67452)
Vincent Belaïche [Sun, 24 Dec 2023 12:02:14 +0000 (13:02 +0100)]
Fix ses-formula-record
* lisp/ses.el (ses-is-cell-sym-p): Tighten test with checking
argument is a local variable.
(ses-formula-record): Fix definition.
(ses-rename-cell): Loosen test on new-name, conversely to
'ses-is-cell-sym-p' tightening.
Vincent Belaïche [Sun, 24 Dec 2023 21:05:54 +0000 (22:05 +0100)]
Fix test about need for explicit printing inserted lines
* lisp/ses.el (ses--blank-line-needs-printing-p): New
function. Does not consider that printer `nil' produces a non
empty string, as `ses-print-cell' removes nil printer by oring to
fallback.
(ses-insert-row): Replace the complex and erroneous test about
blank newline needing printing by a call to
'ses--blank-line-needs-printing-p'.
Stefan Monnier [Sun, 24 Dec 2023 15:13:22 +0000 (10:13 -0500)]
* src/eval.c (signal_or_quit): Fix naming inconsistency with docs
The var's docstring and etc/NEWS refer to "*Redisplay-trace*",
so better use that (which is also more in line with usual practice
of Emacs buffer names).
Stefan Kangas [Sun, 24 Dec 2023 13:27:48 +0000 (14:27 +0100)]
checkdoc: Avoid false positive for keybinding in docstring
* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine):
Avoid false positive when a variable contains a keybinding (for
example, "C-g"). (Bug#68002)
* test/lisp/emacs-lisp/checkdoc-tests.el
(checkdoc-docstring-avoid-false-positive-ok): New test.
Xiyue Deng [Sun, 24 Dec 2023 00:12:44 +0000 (16:12 -0800)]
Fix usage of `setq-default' and offer more suggestions
cd61af0 changed from default-major-mode to major-mode in the first
code sample but didn't change the rest. This patch fixes this and add
some explanations of why use `setq-default' instead of `setq'. In
addition, it gives background on suggesting using text-mode as default
mode and suggest other alternatives.
* doc/lispintro/emacs-lisp-intro.texi (Text and Auto-fill): Fix usage
of `setq-default' and offer more suggestions. (Bug#67848)
* lisp/vc/log-edit.el (log-edit-menu): Insert a menu item for
"Generate ChangeLog".
(log-edit-tool-bar-map): New keymap.
(log-edit-mode): Install this keymap as the tool bar map.
Yuan Fu [Sun, 24 Dec 2023 00:47:04 +0000 (16:47 -0800)]
Increment parser timestamp when narrowing changes (bug#67977)
When narrowing changes, parse reparses, so the timestamp should
definitely increment, just like in ts_record_changes.
Failing to increment this timestamp, outdated nodes would think they
are still up-to-date, and try to print their type name. Printing
their type name involves accessing the old parse tree, which is
already freed during the last reparse.
I also found that we don't increment timestamp when changing parser
ranges and fixed that as well.