1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-24 06:20:43 -08:00
Commit graph

167096 commits

Author SHA1 Message Date
F. Jason Park
deb74de4f2 Simplify multi-frame behavior in erc-bufbar-mode
* lisp/erc/erc-status-sidebar.el (erc-status-sidebar-singular,
erc-status-sidebar--singular-p): Replace option new in ERC 5.6 with
the latter, an internal flag.
(erc-status-sidebar-get-window): Use new name for option turned
ordinary variable `erc-status-sidebar--singular-p'.
(erc-status-sidebar-close): Add comment.
(erc-status-sidebar--open): New function containing the old body of
`erc-status-sidebar-open'.
(erc-bufbar-mode, erc-bufbar-enable, erc-bufbar-disable): Update
variable names.  Close sidebar window on all frames when disabling,
and don't set mode variable to nil when enabling.  These may have made
some practical sense but were illogical.  For example, it's confusing
to leave `erc-status-sidebar--open' in `erc--setup-buffer-hook' while
reporting the mode as being disabled.
(erc-status-sidebar-open): Move to slightly later in same file, after
defining `erc-bufbar-mode'.  When `erc-bufbar-mode' is active, always
create a sidebar if needed, even when another frame is already
displaying one.
(erc-status-toggle-sidebar): When `erc-bufbar-mode' is disabled,
revert to pre-5.6 behavior.  When the module is enabled, adopt new
behavior of ensuring the current frame shows a sidebar, even if
another frame already has one.
(erc-status-sidebar-refresh): Save and restore `window-start' in all
windows showing a sidebar buffer after refreshing.  Update option and
variable names.
(erc-status-sidebar-refresh-triggers): Add doc string, noting that the
variable is set locally when the option
`erc-status-sidebar-highlight-active-buffer' is non-nil.
(erc-status-sidebar--highlight-refresh-triggers): New variable
containing additional triggers enabled when the option
`erc-status-highlight-active-buffer' is non-nil.
(erc-status-sidebar--refresh-unless-input): New function to run
`erc-status-sidebar-refresh' unless input is pending or the selected
window's buffer is a minibuffer.
(erc-status-sidebar--post-refresh): Call `erc-status-sidebar-refresh'
wrapper `erc-status-sidebar--refresh-unless-input' instead.
(erc-status-sidebar-set-window-preserve-size): Update var name to
`erc-status-sidebar--singular-p'.
(erc-status-sidebar-mode): Run `erc-status-sidebar--post-refresh' on
`window-selection-change-functions' globally when highlighting active
buffers.  (bug#63595)
2023-07-28 16:39:04 -07:00
F. Jason Park
fb57b6ccb9 ; Add example buffer-display option to ERC's manual
* doc/misc/erc.texi: Add customization for `erc-interactive-display'
to Sample Configuration section.
* etc/ERC-NEWS: Improve various entries, like those for
`keep-place-indicator', `fill-wrap', `bufbar', etc.
2023-07-28 16:34:31 -07:00
F. Jason Park
8623159b4a Fix CTCP ACTION regression in erc-fill-wrap
* lisp/erc/erc-fill.el (erc-fill--wrap-continued-message-p): Return
nil when current message is a CTCP ACTION.  This fixes a regression
introduced by 63d8b2a59a "Make erc-fill-wrap work with left-sided
stamps".
* test/lisp/erc/erc-fill-tests.el: (erc-fill-wrap--merge-action):
New test.
* test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld: New
test data file.  (Bug#60936)
2023-07-28 16:34:31 -07:00
Basil L. Contovounesios
6479e8758d ; Avoid recent tar-mode.el constant mutation
* lisp/tar-mode.el (tar-attr-vector): Initialize with fresh vector
to avoid constant vector mutation (bug#64686).
(tar-parse-pax-extended-header): Use fillarray.
2023-07-28 18:36:14 +02:00
Ulrich Müller
8c3338f6ba Avoid spurious whitespace in the modeline of emacsclient frames
* lisp/bindings.el (mode-line-client): Compute 'help-echotext
property in advance.  (Bug#58183)
2023-07-28 15:38:39 +03:00
Tassilo Horn
53948b6bff Make shell command status code checks more robust
* lisp/doc-view.el (doc-view-ghostscript-program)
(doc-view--revert-buffer, doc-view--pdf-outline): Compare
'shell-command' / 'call-process' return values with 'eql' instead of
'=' to cater for the situation where the process received a signal.
2023-07-28 12:26:49 +02:00
Mattias Engdegård
aa360dfc3e Clarify docs about regexp syntax-dependent character classes
* doc/lispref/searching.texi (Char Classes, Rx Constructs)
(Regexp Problems): Note that character classes don't take syntax
properties into account.
2023-07-28 11:32:10 +02:00
Mattias Engdegård
0ecf2549a2 Make uniquify-tests work with out-of-tree builds and clean up
* test/lisp/uniquify-tests.el (uniquify-project-transform):
Set an explicit default-directory.
* test/lisp/uniquify-tests.el (uniquify-dirs): Remove temporary
directory after test.
2023-07-28 11:31:58 +02:00
Manuel Giraud
5efc7b22ce Fix image-dired-utils-tests after 83b6a8a514 (bug#61394) 2023-07-28 09:50:48 +03:00
Eli Zaretskii
36b6124d81 Fix userlock.el and filelock-tests in some rare cases
* lisp/userlock.el (userlock--check-content-unchanged): Don't
assume 'file-truename' of FILENAME is always non-nil.  It could be
nil if we are called from a temporary buffer where some Lisp
program has forcibly set 'buffer-file-name'.  (Bug#64821)

* test/src/filelock-tests.el (filelock-tests--fixture): Set
'buffer-file-name' to the true name of the temporary file.
Patch by Mattias Engdegård <mattias.engdegard@gmail.com>.
(filelock-tests-detect-external-change): Quote the file names
passed to shell commands.
2023-07-28 09:31:25 +03:00
Tassilo Horn
fd88b6cdd4 ; Make doc-viev-imenu-enabled default value a boolean again 2023-07-28 07:08:40 +02:00
Eli Zaretskii
3443574a66 ; * lisp/tar-mode.el (tar-header-block-tokenize): Fix logic (bug#64686). 2023-07-27 19:09:33 +03:00
Mattias Engdegård
024bd1f090 Fix function help for advised aliases (bug#64797)
* lisp/help-fns.el (help-fns--analyze-function):
For aliases, use the base function name if at the end of the chain.
This fixes a regression introduced in d30fde6b0c.

Reported by Michael Heerdegen.
2023-07-27 17:09:30 +02:00
Mattias Engdegård
4336d7e44a * lisp/emacs-lisp/byte-opt.el (byte-compile-trueconstp): Extend
Add skip-chars-forward, skip-chars-backward, skip-syntax-forward,
skip-syntax-backward, current-column, current-indentation,
char-syntax, syntax-class-to-char, parse-partial-sexp, goto-char,
forward-line, next-window, previous-window, minibuffer-window,
selected-frame, selected-window, standard-case-table,
standard-syntax-table, syntax-table, frame-first-window,
frame-root-window and frame-selected-window as always-true functions.
2023-07-27 17:09:30 +02:00
Mattias Engdegård
93eccb5e04 Better compilation of char-before, backward-char and backward-word
Implement char-before, backward-char and backward-word as compiler
macros instead of byte-compile handlers so that the source-level
optimiser gets to simplify the result.  In particular, this removes
some branches.

* lisp/emacs-lisp/bytecomp.el (byte-compile-char-before)
(byte-compile-backward-char, byte-compile-backward-word): Remove.
(bytecomp--char-before, bytecomp--backward-char)
(bytecomp--backward-word): New.
2023-07-27 17:09:30 +02:00
Michael Albinus
e055c635b0 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2023-07-27 16:52:38 +02:00
Andrew Tropin
42a911c61e notifications: Allow to use Icon Naming Specification for app-icon
* doc/lispref/os.texi (Desktop Notifications): Extend meaning of
:app-icon.

* etc/NEWS: Allow to use Icon Naming Specification for app-icon in
notifications-notify.

* lisp/notifications.el (notifications-notify): Allow to use Icon
Naming Specification for app-icon.
2023-07-27 16:43:17 +02:00
Manuel Giraud
83b6a8a514 New option 'image-dired-thumb-naming' (bug#61394)
* lisp/image/image-dired.el (image-dired-thumb-naming): New user
option to control thumbnail name.

* lisp/image/image-dired-util.el (image-dired-thumb-name): Update
to use new user option and compute contents SHA-1 if needed.
(image-dired-contents-sha1): New function to compute the SHA-1 of the
first 4KiB of a file.
2023-07-27 17:00:59 +03:00
Eli Zaretskii
7ea3f39dee Avoid crashes due to invalid 'mode-line-format'
* src/xdisp.c (display_mode_element, redisplay_window_error):
Don't take XCAR of what can be Qnil.  (Bug#64893)
2023-07-27 15:34:38 +03:00
Michael Albinus
184fc9b020 Fix problem with null-device in Tramp
* lisp/net/tramp-sh.el (tramp-sh-handle-expand-file-name):
`null-device' could be nil.  Reported by Richard Copley
<rcopley@gmail.com>.
2023-07-27 13:36:48 +02:00
Eli Zaretskii
2dc5f17c3e Support Posix-standard pax extended header in tar files
* lisp/tar-mode.el (pax-extended-attribute-record-regexp)
(tar-attr-vector): New variables.
(pax-gid-index, pax-gname-index, pax-linkpath-index)
(pax-mtime-index, pax-path-index, pax-size-index, pax-uid-index)
(pax-uname-index): New constants.
(pax-header-gid, pax-header-gname, pax-header-linkpath)
(pax-header-mtime, pax-header-path, pax-header-size)
(pax-header-uid, pax-header-uname): New accessors to pax header.
(pax-decode-string, tar-parse-pax-extended-header): New functions.
(tar-header-block-tokenize): Recognize and handle Posix-standard
pax extended header, and use its attributes instead of those in
the standard tar header.  (Bug#64686)
2023-07-27 11:36:00 +03:00
Michael Albinus
b936ff0963 Fix Tramp error on macOS
* lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options):
Don't use an absolute ControlPath on macOS.  (Bug#64880)
2023-07-27 09:30:41 +02:00
Eli Zaretskii
5d245e9d0d Fix image-dired-util-tests on MS-Windows
* test/lisp/image/image-dired-util-tests.el
(image-dired-thumb-name/image-dired)
(image-dired-thumb-name/per-directory): Make these tests work on
MS-Windows, where a file name such as "/foo/bar" gets added the
drive letter when passed through 'expand-file-name'.
2023-07-27 10:28:43 +03:00
Eli Zaretskii
d8c1d3e49b Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2023-07-27 10:01:25 +03:00
Eli Zaretskii
e708da6227 ; Better documentation of HOME on MS-Windows
* doc/emacs/custom.texi (Find Init): Add footnote about HOME on
MS-Windows.  (Bug#64871)
2023-07-27 10:00:08 +03:00
Eli Zaretskii
d59630e591 ; Better documentation of HOME on MS-Windows
* doc/emacs/custom.texi (Find Init): Add footnote about HOME on
MS-Windows.  (Bug#64871)
2023-07-27 09:51:39 +03:00
Eli Zaretskii
e650a14f64 ; Clarify documentation of 'server-after-make-frame-hook'
* doc/lispref/frames.texi (Creating Frames):
* lisp/server.el (server-after-make-frame-hook): Clarify
documentation of 'server-after-make-frame-hook'.  (Bug#64873)
2023-07-27 09:37:03 +03:00
Mattias Engdegård
27944247d1 Fix broken byte-compilation of unary comparisons
* lisp/emacs-lisp/byte-opt.el (byte-opt--nary-comparison):
Fix a typo causing miscompilation of code such as (OP X),
where OP is <, >, <=, >= or =.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--test-cases): Add test case.

Reported by Richard Copley.
2023-07-26 18:49:51 +02:00
Mattias Engdegård
b4063c399b * lisp/emacs-lisp/byte-opt.el (pure-fns): Add max-char 2023-07-26 17:34:03 +02:00
Mattias Engdegård
82f5f3b8a2 Provide backtrace for byte-ops aref and aset
Produce synthetic backtrace entries for `aref` and `aset` byte-ops
when the index is non-fixnum, or is out of range for vector or record
arguments (bug#64613).

* src/bytecode.c (exec_byte_code): Detect type and range errors
in-line for aref and aset.
* src/data.c (syms_of_data): Declare symbols Qaref and Qaset.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--byte-op-error-cases): Add test cases.
2023-07-26 17:34:03 +02:00
Mattias Engdegård
c50f6538cf ; bytecode backtrace test clean-up 2023-07-26 17:34:02 +02:00
Eli Zaretskii
6572dcc7f5 ; Documentation followup to last change
* lisp/progmodes/project.el (project-uniquify-dirname-transform):
* lisp/uniquify.el (uniquify-dirname-transform): Doc fixes.

* etc/NEWS: Announce the change.
2023-07-26 18:11:49 +03:00
Spencer Baugh
2aec67f4de Support transforming the dirname used by uniquify
By transforming the buffer's directory name, we can add
additional information to use during uniquifying.  A basic
one: uniquifying buffer names based on the project name.
* lisp/progmodes/project.el (project-uniquify-dirname-transform): Add.
* lisp/uniquify.el (uniquify-dirname-transform-default)
(uniquify-dirname-transform): Add.  (Bug#62621)
(uniquify-rationalize-file-buffer-names, uniquify-buffer-file-name):
Use 'uniquify-dirname-transform'.
* test/lisp/uniquify-tests.el (uniquify-home)
(uniquify-project-transform): Add tests.
2023-07-26 17:41:48 +03:00
Eli Zaretskii
4ef9cc5a5d Fix "M-x man RET [ RET"
* lisp/man.el (Man-completion-table): Quote special characters
before passing them to the shell.
(Man-name-regexp): Allow '@' and '[' in man-page names.  (Bug#64795)
2023-07-26 17:30:21 +03:00
Neal Sidhwaney
8abe4ca83a Add 'define-error' to font lock keywords for emacs-lisp-mode
* lisp/emacs-lisp/lisp-mode.el (lisp-fdefs): Add 'define-error'.
(Bug#64824)

* test/lisp/emacs-lisp/lisp-mode-tests.el
(test-font-lock-keywords): New test.

Copyright-paperwork-exempt: yes
2023-07-26 17:22:05 +03:00
Brian Leung
bcadb728e2 lisp-mode.el: Add defvar-keymap to lisp-imenu-generic-expression
* lisp/emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression):
Add defvar-keymap.  We do not ignore (defvar-keymap FOO)
constructs in imenu as we do with (defvar FOO) since the former
constructs are generally not vacuous whereas the latter ones
often are.  (Bug#64831)
2023-07-26 17:14:46 +03:00
Laurence Warne
586bdd6f9a Fix unstable Proced refine tests
* test/lisp/proced-tests.el (proced-refine-test)
(proced-refine-with-update-test): Also check if the parent
process id of each process matches the process id refined
on before failing, since the refiner for process id returns
the children of a process in addition to the process itself.
(Bug#64800)
2023-07-26 17:09:23 +03:00
Valtteri Vuorikoski
3449ff5b65 Fix build --with-sound on NetBSD and OpenBSD
* configure.ac: Use ossaudio by default on *BSD systems.
(Bug#64698)

* etc/NEWS: Announce the change.
2023-07-26 17:03:58 +03:00
Harald Jörg
04a930a08c cperl-mode.el: Bring cperl-short-docs up to Perl 5.38.
* lisp/progmodes/cperl-mode.el (imenu-max-items): declare the
variable to silence an elint warning.
(cperl-short-docs): Reorder function description to match Perl's
perlfunc documentation.  Add missing shortdocs from perlfunc.
Delete entries for operators which don't exist any more (EQ, NE
and friends).  Shorten docstring lines to 80 chars or less.
2023-07-26 09:55:34 +02:00
Eli Zaretskii
65834b8f8d Avoid crashes under 'which-key-mode'
* src/keyboard.c (Fthis_single_command_keys): Don't allow calls to
Fvector with negative first argument.  (Bug#64857)
2023-07-25 20:38:01 +03:00
Eli Zaretskii
142007b747 Don't suggest to revert buffer from non-existing file
* lisp/files-x.el (modify-file-local-variable-message): Suggest to
revert from the buffer's file only if that file exists; otherwise
suggest 'normal-mode'.  (Bug#64844)
2023-07-25 17:51:58 +03:00
Eli Zaretskii
f6e4e77d23 ; Minor documentation fixes
* src/character.c (Fstring_width): Doc fix.

* doc/emacs/trouble.texi (Understanding Bug Reporting): Fix typo
(bug#64854).
2023-07-25 16:49:18 +03:00
Eli Zaretskii
8955853368 Don't signal error when locking a file from non file-visiting buffer
* lisp/userlock.el (userlock--check-content-unchanged): Support
the case where a file is locked before being written to from a
non file-visiting buffer.  (Bug#64821)
2023-07-24 18:08:40 +03:00
Eli Zaretskii
acebaa793f ; * src/xdisp.c (mark_window_display_accurate_1): Avoid more aborts. 2023-07-23 14:49:18 -04:00
Eli Zaretskii
bbd91a05fa Fix rare aborts in CHECK_WINDOW_END
Those aborts happen because a window's window_end_vpos value
is inconsistent with the current matrix's number of rows, which
happens after resizing the mini-window.
* src/xdisp.c (mark_window_display_accurate_1): Don't validate the
window_end_valid flag if window_end_vpos is inconsistent with the
current_matrix's number of rows.  This happens, e.g., when
Edebug wants to show a value in the mini-window that causes it to
resize, as the window above the mini-window was usually already
redisplayed, and we think its display is accurate.
2023-07-23 13:44:40 -04:00
Basil L. Contovounesios
865817633f ; * src/pdumper.c (dump_overlay): Update hash.
This follows commit 7ac947f34c
of 2023-07-13 "; * src/lisp.h (struct Lisp_Overlay): Update
commentary (bug#64580)."
2023-07-23 08:39:17 +01:00
Laurence Warne
237c0b583c Fix Proced Start column alignment for different locales
* lisp/proced.el (proced-grammar-alist): Change the justify
value of the start attribute to 'left' instead of a fixed
value of 6.  (Bug#64752)
(proced-format-start): Adjust the doc string.
2023-07-23 09:39:45 +03:00
Stefan Monnier
f37c65b402 * src/eval.c (get_backtrace): Don't skip the top frame
`profiler.el` was reporting incomplete backtraces.
I had a suspicion there was something off, but it became obvious
when I saw that `set-buffer-multibyte` did not appear in the
`profiler-report` output when opening a large compressed tarball,
even though I knew it to be a large contributor (which `elp-results`
confirmed).

I have no idea why this `backtrace_next` was there, sadly, but now
`profiler-report` gives me results that make a lot more sense.
2023-07-22 17:35:18 -04:00
Mattias Engdegård
5d2d28458d Fix regexp character class syntax property ghost matching bug
The syntax-table-dependent regexp character classes [:space:],
[:word:] and [:punct:] always use the buffer-local syntax table for
performance reasons.  Fix a bug that could cause ghost (mis)matches
from use of lingering state by constructs that do use syntax
properties, such as `\sX`.

* src/regex-emacs.c (BUFFER_SYNTAX): New macro.
(ISPUNCT, ISSPACE, ISWORD): Use BUFFER_SYNTAX instead of SYNTAX.
(regex_compile): Delete syntax table setup code that is no longer
needed.
* test/src/regex-emacs-tests.el (regex-emacs-syntax-properties):
New regression test.
2023-07-22 18:26:57 +02:00
Eli Zaretskii
cfdce1a19f ; Fix documentation of last change.
* src/xdisp.c (syms_of_xdisp):
* src/dispnew.c (syms_of_display):
* doc/lispref/commands.texi (Accessing Mouse): Fix documentation
of last change.
2023-07-22 18:50:26 +03:00