1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-25 23:10:47 -08:00
Commit graph

84287 commits

Author SHA1 Message Date
Philip Kaludercic
5767e06b8e Revert "; * rcirc.el (rcirc-print): Prefer sleep-for over sit-for" 2022-02-19 22:04:44 +01:00
Philip Kaludercic
43237f3d27 ; * rcirc.el (rcirc-print): Prefer sleep-for over sit-for
Compare

	(benchmark-run 100000 (sit-for 0))
	;; => (2.600030102 12 1.523461324000003)

with

	(benchmark-run 100000 (sleep-for 0))
	;; (0.015882939 0 0.0)
2022-02-19 20:35:01 +01:00
Stefan Monnier
f262a6af36 (macroexp-warn-and-return): Fix bug#53618
* lisp/emacs-lisp/macroexp.el (macroexp-warn-and-return):
Reorder arguments to preserve compatibility with that of Emacs-28.
(macroexp--unfold-lambda, macroexp--expand-all):
* lisp/emacs-lisp/pcase.el (pcase-compile-patterns, pcase--u1):
* lisp/emacs-lisp/gv.el (gv-ref):
* lisp/emacs-lisp/eieio.el (defclass):
* lisp/emacs-lisp/eieio-core.el (eieio-oref, eieio-oref-default)
(eieio-oset-default):
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode):
* lisp/emacs-lisp/cl-macs.el (cl-symbol-macrolet, cl-defstruct):
* lisp/emacs-lisp/cl-generic.el (cl-defmethod):
* lisp/emacs-lisp/byte-run.el (defmacro, defun):
* lisp/emacs-lisp/bindat.el (bindat--type): Adjust accordingly.
2022-02-19 14:20:02 -05:00
Stefan Monnier
910cdcf8c3 * lisp/vc/diff-mode.el (diff--font-lock-prettify): Fix mishaps
This reverts the last change so it also applies to non-git diffs again.
Instead, we're now more careful not to mis-recognize file headers as
addition/removal lines.
In addition to that, mark the file header such that it's
re-font-locked all at once, and to still recognize it after
`diff-reverse-direction`.
2022-02-19 13:45:04 -05:00
Michael Albinus
7e4ef09aa0 Adapt Tramp password prompts for sudo-like methods
* doc/misc/tramp.texi (Password handling): Explain entries for
doas, sudo and sudoedit.

* etc/NEWS (Tramp): Document changed password prompts.

* lisp/net/tramp-sh.el (tramp-methods) <sudo, doas>:
Add `tramp-password-previous-hop'.
(tramp-maybe-open-connection): Modify `previous-hop' if needed.

* lisp/net/tramp-sudoedit.el (tramp-methods) <sudoedit>:
Add `tramp-password-previous-hop'.
(tramp-sudoedit-null-hop): New defconst.
(tramp-sudoedit-send-command): Use it.

* lisp/net/tramp.el (tramp-methods): Adapt docstring.
(tramp-null-hop): New defconst.
(tramp-get-remote-null-device): Use it.
2022-02-19 18:38:12 +01:00
Lars Ingebrigtsen
d98b6fbba2 Add column sorting order indicators to vtable
* lisp/emacs-lisp/vtable.el (vtable--indicator): New function.
(vtable--insert-header-line): Use it to display sorting order
indicators.
2022-02-19 14:21:19 +01:00
Lars Ingebrigtsen
babfb064c4 Make string-pixel-width slightly speedier
* lisp/emacs-lisp/subr-x.el (string-pixel-width): Speed up
string-pixel-width in the zero-length string case.
2022-02-19 14:21:19 +01:00
Mauro Aranda
f273a504be Fix types of some align.el defcustoms
* lisp/align.el (align-region-heuristic)
(align-large-region): Both options can be nil, but the defcustom type
didn't allow nil values.
(align-rules-list-type): The "Run If" and "Valid" attributes
should be functions, but the default value was t.  Change it to
#'always (bug#54048).
2022-02-19 13:34:11 +01:00
Mauro Aranda
8ccf9b5276 Fix :match function for the key widget
* lisp/wid-edit.el (key): Calling key-valid-p directly doesn't work,
because the :match function is called with the widget and the value as
arguments (bug#54049).
2022-02-19 13:33:32 +01:00
Lars Ingebrigtsen
dfaf150631 Add a new library to format variable-pitch tables
* doc/misc/vtable.texi (Index): New manual.

* lisp/emacs-lisp/vtable.el: New library.
2022-02-19 13:16:28 +01:00
Alan Mackenzie
f687e62ac5 Fix symbols with position appearing in the output of `compile-defun'
This happened with the tags of a condition-case.  Also fix the detection of
circular lists while stripping the positions from symbols with position.

* lisp/emacs-lisp/byte-run.el (byte-run--circular-list-p): Remove.
(byte-run--strip-s-p-1): Write a value of t into a hash table for each cons or
vector/record encountered.  (This is to prevent loops with circular
structures.)  This is now done for all arguments, not just those detected as
circular lists.

* lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-defvar)
(byte-compile-form, byte-compile-dynamic-variable-op)
(byte-compile-constant, byte-compile-push-constant): Remove redundant calls to
`bare-symbol'.
(byte-compile-lambda): call `byte-run-strip-symbol-positions' on the arglist.
(byte-compile-out): call `byte-run-strip-symbol-positions' on the operand.
This is the main call to this function in bytecomp.el.

* src/fns.c (hashfn_eq): Strip the position from an argument which is a symbol
with position.
(hash_lookup): No longer strip a position from a symbol with position.
(sxhash_obj): Add handling for symbols with position, substituting their bare
symbols when symbols with position are enabled.
2022-02-19 10:38:19 +00:00
Stefan Kangas
76ee4dc823 Merge from origin/emacs-28
57c112cfe5 ; * doc/emacs/files.texi (Comparing Files): Fix a reference.
bdeac2d5af ; Fix a typo in filesets.el's doc string
2022-02-19 06:30:51 +01:00
Eric Abrahamsen
51e51ce2df Handle multiple directory separators in gnus-search results
Try to treat the file names more like file names, less like strings
to massage.

* lisp/gnus/gnus-search.el (gnus-search-indexed-parse-output): Use
`expand-file-name' to collapse separators and generally canonicalize
the name. Use `file-name-split' and joining instead of regexp
munging.
2022-02-18 08:37:33 -08:00
Eli Zaretskii
bdeac2d5af ; Fix a typo in filesets.el's doc string
* lisp/filesets.el (filesets-remove-buffer, filesets-add-buffer):
Doc fixes.  Reported by Иванов Дмитрий <d.ivanov@1001tur.ru>.
2022-02-18 15:46:57 +02:00
Eli Zaretskii
3306e11107 Merge from origin/emacs-28
1e4b04c Improve documentation of filling and justification commands
9fd396e * lisp/progmodes/subword.el (superword-mode): Doc fix.  (Bug#...
e303cb1 Fix indexing of module functions that return complex types.
2022-02-18 10:38:53 +02:00
Eli Zaretskii
2ed240296c Merge from origin/emacs-28
c8442df ; Separate command and concept index in Transient manual
8aa052c ; Fix Transient manual
5b7752a Fix problem with popd for in remote shell buffers
38f6ea1 Import texi source file for transient manual
df34929 Update to Org 9.5.2-15-gc5ceb6
2022-02-18 10:38:49 +02:00
Eli Zaretskii
c2913c30b1 Merge from origin/emacs-28
# Conflicts:
#	lisp/startup.el
2022-02-18 10:38:42 +02:00
Eli Zaretskii
1e4b04c540 Improve documentation of filling and justification commands
* doc/lispref/text.texi (Filling):
* lisp/textmodes/fill.el (fill-region-as-paragraph)
(default-justification, set-justification, justify-current-line):
Clarify "canonicalization" of spaces and the meaning of
justification styles.  (Bug#54047)
(set-justification-left, set-justification-right)
(set-justification-full): Improve wording of doc strings.
2022-02-18 09:47:44 +02:00
Eli Zaretskii
9fd396e4d0 * lisp/progmodes/subword.el (superword-mode): Doc fix. (Bug#54045) 2022-02-18 09:01:06 +02:00
Andrew G Cohen
9a9a3390ad Make sure nnselect search query is properly parsed
* lisp/gnus/gnus-search.el (gnus-search-make-spec): The search query
should not be interpreted as raw, but whatever the underlying search
engine expects.
2022-02-18 14:01:55 +08:00
Andrew G Cohen
8a924c8b49 Fix gnus searching of native servers
* lisp/gnus/gnus-group.el (gnus-group-make-search-group):
(gnus-group-read-ephemeral-search-group):  Find the real server even
when the group is native.
2022-02-18 13:59:34 +08:00
Eric Abrahamsen
86ebc88cd8 Fix gnus-search-run-search methods
* lisp/gnus/gnus-search.el (gnus-search-run-search): Both these
implementations were setting the current buffer and then not setting
it back.
2022-02-17 21:29:36 -08:00
Eric Abrahamsen
246f627a41 Fix gnus-search notmuch thread searches
* lisp/gnus/gnus-search.el (gnus-search-run-search): Multiple things
wrong with collecting thread ids from the search results, and
constructing a new search query.
(gnus-search-indexed-search-command): Use list appending rather than
backtick construction, that was more confusing than it was helpful.
2022-02-17 13:11:25 -08:00
Juri Linkov
3d0f5bc219 * lisp/mouse.el (context-menu-entry): Don't create menu for Help commands.
Help commands that describe keybindings call context-menu-entry bound to
a key.  This causes too much trouble when trying to build the context menu
in a temporary Help buffer that is not displayed in a window.
OTOH, there is no information in context menus useful for Help commands.
So `help-buffer-under-preparation' is added to filter out such calls.
(bug#53910)
2022-02-17 20:28:43 +02:00
Eli Zaretskii
09ba81f1d2 ; * lisp/international/fontset.el (otf-script-alist): Update. 2022-02-17 19:23:46 +02:00
Eli Zaretskii
927bebcd4b Resurrect innocent joke in byte-opt.el
* lisp/emacs-lisp/byte-opt.el: Resurrect innocent joke in a
comment.
2022-02-17 16:35:03 +02:00
Mattias Engdegård
c1111e9447 Fix or remove outdated comments
* src/eval.c (funcall_lambda): Rewrite obsolete comment.
* src/bytecode.c (exec_byte_code): Remove lying comment and
unneeded #define.
* lisp/emacs-lisp/byte-opt.el: Remove car.  Keep pig.
(byte-compile-log-lap-1): Remove obsolete and irrelevant comment.
2022-02-17 14:52:04 +01:00
Stefan Monnier
df6e989f7a * lisp/face-remap.el: Fix bug#53294
* lisp/face-remap.el (face-remap--copy-face): New function.
(face-attrs--make-indirect-safe): Use it.
2022-02-17 08:37:24 -05:00
Eli Zaretskii
a6b7bb2dfd Speed up exiting "emacs -Q"
* lisp/files.el (files--buffers-needing-to-be-saved): Don't call
functions from seq.el.  Using seq.el has an annoying side-effect
of slowing down "C-x C-c" from "emacs -Q" due to the need to load
seq.el.
2022-02-17 15:26:37 +02:00
Lars Ingebrigtsen
c218660d66 Add a NEWS entry for the bookmark changes (bug#54030)
* lisp/bookmark.el (bookmark-bmenu-mode): Make the type shorter.
2022-02-17 12:58:12 +01:00
Matthias Meulien
a1617f070b Don't prefix bookmark name with VC backend name
* lisp/vc/vc-dir.el (vc-dir-bookmark-make-record): Remove prefix from
bookmark name.
2022-02-17 12:58:12 +01:00
Matthias Meulien
7c99526435 Extend bookmark menu with with handler type column
* lisp/bookmark.el (bookmark-bmenu--revert): Extend table entries with
handler type.
(bookmark-bmenu-mode): Add handler type column.
* lisp/doc-view.el (doc-view-bookmark-jump): Set bookmark handler type.
* lisp/help-mode.el (help-bookmark-jump): Set bookmark handler type.
* lisp/image-dired.el (image-dired-bookmark-jump): Set bookmark handler type.
* lisp/info.el (Info-bookmark-jump): Set bookmark handler type.
* lisp/net/eww.el (eww-bookmark-jump): Set bookmark handler type.
* lisp/vc/vc-dir.el (vc-dir-bookmark-jump): Set bookmark handler type.
* lisp/woman.el (woman-bookmark-jump): Set bookmark handler type.
2022-02-17 12:58:12 +01:00
Lars Ingebrigtsen
136f1cb549 Have setopt check types
* doc/lispref/variables.texi (Setting Variables): Note type checking.
* lisp/cus-edit.el (setopt--set): New function to avoid having
Customize saving values, too.
(setopt): Use it.
2022-02-17 12:31:12 +01:00
Po Lu
33a9ee2084 Fix warning during dumping on MS-DOS
* lisp/cus-start.el (standard): Filter out
`process-error-pause-time' on MS-DOS.
2022-02-17 19:10:24 +08:00
Michael Albinus
3750612093 Fix problem with "~" in Tramp
* lisp/net/tramp.el (tramp-handle-substitute-in-file-name):
Remove special handling of "~" in localname.  (Bug#53053)
2022-02-17 10:40:52 +01:00
Michael Albinus
8737d79be8 Fix problem with file-modification-time in tramp-sshfs.el
* lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
* lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
Use `tramp-handle-file-notify-add-watch',
`tramp-handle-file-notify-rm-watch' and
`tramp-handle-file-notify-valid-p'.
(tramp-sshfs-handle-write-region): Set file modification time.
(Bug#54016)

* test/lisp/net/tramp-tests.el (tramp--test-asynchronous-processes-p):
Filter out tramp-adb on multi-byte `default-directory'.
(tramp--test-hpux-p, tramp--test-macos-p): Protect against errors.
(tramp--test-check-files): Discriminate also tramp-sshfs.el.
2022-02-16 20:22:45 +01:00
Matthias Meulien
b299c04201 Fix computation of outline heading level for non-git diff
* lisp/vc/diff-mode.el (diff-setup-buffer-type): Compute outline heading level
using diff-hunk-header-re (bug#51809).
(diff--font-lock-prettify): Disable prettify in non-git diff.
2022-02-16 21:19:45 +02:00
Eli Zaretskii
eb0680bd57 Add support for Tai Tham script
* lisp/international/fontset.el (setup-default-fontset)
(script-representative-chars): Add tai-tham.
* lisp/language/thai.el ("Northern Thai"): New language
environment.  Patch by Richard Wordingham
<richard.wordingham@ntlworld.com>.  Set
'composition-function-table' for the Tai Tham block.  Original
code by Richard Wordingham <richard.wordingham@ntlworld.com>.

* etc/HELLO: Add Northern Thai greeting.
* etc/NEWS: Announce addition of Northern Thai language environment.
2022-02-16 17:07:58 +02:00
Po Lu
fd2252294b Fix frame focus handling with native input
* lisp/term/x-win.el (x-gtk-use-native-input-watcher): Stop
passing frame parameter  to `x-internal-focus-input-context'.
* src/xfns.c (Fx_internal_focus_input_context): Focus all focus
frames from all displays.
2022-02-16 15:40:39 +08:00
Michael Albinus
5b7752a865 Fix problem with popd for in remote shell buffers
* lisp/shell.el (shell-prefixed-directory-name):
Use `file-local-name' for DIR.  (Bug#53927)
2022-02-15 18:13:04 +01:00
Michael Albinus
8415a9d58f Some Tramp cleanup
* doc/misc/tramp.texi (Remote processes): Add also tramp-sshfs.el.

* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
Error-out for multi-byte `default-directory'.

* lisp/net/tramp.el (tramp-tolerate-tilde): Move it up.
(tramp-handle-abbreviate-file-name): Use it.
(tramp-read-passwd): Show literal passphrase prompt.
2022-02-15 16:15:55 +01:00
Jim Porter
a4dd94de80 Don't attempt to connect to a remote server during 'abbreviate-file-name'
* lisp/net/tramp.el (tramp-handle-abbreviate-file-name): Only use the
"home-directory" when a connection has been established.
2022-02-15 08:10:21 -05:00
Lars Ingebrigtsen
8a2f73f12a Allow savehist-additional-variables to truncate lists
* lisp/savehist.el (savehist-save): Allow truncating values (bug#30943).
2022-02-15 11:29:43 +01:00
Lars Ingebrigtsen
5c9d34cdf8 Make autoarg obsolete
* lisp/obsolete/autoarg.el: Make obsolete.
2022-02-15 10:56:58 +01:00
Eric Abrahamsen
d43ca38556 Fix docstring and init of Gnus search -remove-prefix options
* lisp/gnus/gnus-search.el (*-remove-prefix): For all engine defaults,
remove incorrect docs stating this is a regexp (it's a string). Also,
use `expand-file-name' to get the correct default value, not `concat'
and (getenv "HOME").
2022-02-14 16:06:14 -08:00
Eli Zaretskii
a90dc11e24 Improve format of values returned by 'file-size-human-readable'
* lisp/files.el (file-size-human-readable): Emit one digit of the
fractional part of the size only if there's just one digit before
the decimal point.
2022-02-14 18:59:38 +02:00
Lars Ingebrigtsen
d52d913fa0 Don't signal errors in abbrev-table-p
* lisp/abbrev.el (abbrev-table-p): Ignore the error.
* src/lread.c (oblookup): Signal `wrong-type-argument' instead of
`error' if it turns out that we're not really in an obarray (bug#53988).
2022-02-14 12:00:22 +01:00
Philip Kaludercic
35bb4c1c3c Improve stability of message-hide-headers
* message.el (message-hide-headers): Use a pointer instead of tracking
the "end-of-headers" point manually (bug#53991).
2022-02-14 11:51:48 +01:00
Po Lu
b47d36f189 Improve Haiku selection handling
* lisp/select.el (gui--selection-value-internal): Use X types on
Haiku as well.

* lisp/term/haiku-win.el (haiku--selection-type-to-mime): Update
types to correspond better with X.

* src/haikuselect.c (Fhaiku_selection_data):
(Fhaiku_selection_put): Remove a great deal of ad hoc code now
handled by the regular selection machinery.
2022-02-14 10:26:29 +00:00
Lars Ingebrigtsen
13b9268374 Add a mechanism for querying before executing a command
* doc/emacs/custom.texi (Disabling): Document it.
* doc/lispref/commands.texi (Disabling Commands): Document the
low-level stuff.

* lisp/simple.el (command-execute): Respect the `(query ...)'
value for `disabled'.
(command-execute--query): New function.
(command-query): New function.
2022-02-14 11:20:41 +01:00