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

83790 commits

Author SHA1 Message Date
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
Michael Albinus
bd07d4fac9 Improve Tramp's process-file implementations
* lisp/net/tramp-adb.el (tramp-adb-handle-process-file)
* lisp/net/tramp-sh.el (tramp-sh-handle-process-file):
* lisp/net/tramp-smb.el (tramp-smb-handle-process-file):
* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-process-file):
Improve implementation.  (Bug#53854)

* test/lisp/net/tramp-tests.el (tramp-test28-process-file)
(tramp--test-check-files, tramp-test47-unload): Extend tests.
2022-02-13 20:50:51 +01:00
Juri Linkov
fc44bc6255 * lisp/faces.el (read-face-name-sample-text): Add defconst (bug#53960).
(read-face-name): Use it instead of hard-coded string.
2022-02-13 20:44:14 +02:00
Lars Ingebrigtsen
997dd86a9f Add a new macro `setopt'
* doc/emacs/custom.texi (Examining): Mention it.
(Init Syntax): Ditto.

* doc/emacs/windows.texi (Window Choice): Adjust example.

* doc/lispref/windows.texi (Choosing Window Options): Adjust examples.

* doc/lispref/variables.texi (Setting Variables): Document setopt.

* doc/misc/eudc.texi (Emacs-only Configuration): Adjust examples.

* lisp/cus-edit.el (setopt): New macro.
2022-02-13 16:29:26 +01:00
Eli Zaretskii
68b3273214 ; * lisp/simple.el (count-words): Doc fix. 2022-02-13 15:05:13 +02:00
Lars Ingebrigtsen
c189ce5a33 Remove the 'C-k' binding in ido-mode
* lisp/ido.el (ido-file-completion-map): Remove the `C-k' binding,
because it's too dangerous and probably not very useful (bug#44556).
2022-02-13 11:24:22 +01:00
Lars Ingebrigtsen
242a2765d3 Make `C-u M-x count-words' also give totals
* lisp/simple.el (count-words-region): Adjust callers.
(count-words): If given a prefix, give totals (bug#9959).
(count-words--buffer-format, count-words--format): Rename and
don't message, but return the string.
2022-02-13 10:56:20 +01:00
Lars Ingebrigtsen
9a4cc857aa Fix mouse clicking in read-face-name
* lisp/faces.el (read-face-name): Put the data in the right
position so that clicking on completions work (bug#53960).
2022-02-13 09:35:55 +01:00
Bob Rogers
51d44fd705 Fix ietf-drums-remove-whitespace unmatched " and (
* lisp/mail/ietf-drums.el:
+ (ietf-drums-skip-comment):  New helper function.
+ (ietf-drums-remove-comments):  Use ietf-drums-skip-comment.
+ (ietf-drums-remove-whitespace):  Handle unterminated quotes and
comments, as ietf-drums-remove-comments already does.
* test/lisp/mail/ietf-drums-tests.el:
+ Test unterminated quote and comment for
ietf-drums-remove-whitespace and ietf-drums-remove-comments (bug#53965).
2022-02-13 09:32:13 +01:00
Eli Zaretskii
b5997c0f10 Optionally allow point to enter composed character sequences
This changeset is based on code originally posted by
Kenichi Handa <handa@gnu.org> as part of discussing bug#20140,
with a few adjustments and changes, mainly to support R2L
text and provide a user option to control the feature.
* src/xdisp.c (compute_stop_pos, next_element_from_buffer)
(composition_reseat_it): Don't allow auto-composing characters
past point when 'composition-break-at-point' is non-nil.
(syms_of_xdisp) <composition-break-at-point>: New boolean variable.
(redisplay_internal, redisplay_window): Disable "just move the
cursor" optimizations when 'composition-break-at-point' is non-nil.
* src/keyboard.c (command_loop_1): Force redisplay when
'composition-break-at-point' is non-nil.

* lisp/cus-start.el (standard): Provide customization form for
'composition-break-at-point'.

* etc/NEWS: Announce the new feature.
2022-02-12 20:38:51 +02:00
Lars Ingebrigtsen
c4da0d3312 Improve interaction between track-mouse and edebug
* lisp/emacs-lisp/edebug.el (edebug--display-1): Work around
`track-mouse' oddity (bug#675).
2022-02-12 08:40:30 +01:00
Lars Ingebrigtsen
2b97e83cc1 Fix off-by-one file size formatting in ls-lisp
* lisp/ls-lisp.el (ls-lisp-format, ls-lisp-format-file-size): The
human-readable file sizes can be 7 characters wide (e.g.,
"1016.1k") (bug#53937).
2022-02-12 08:07:42 +01:00
Lars Ingebrigtsen
53ef883b52 Cross-link message-expand-name-standard-ui-relevant doc strings
* lisp/gnus/message.el (message-expand-name-standard-ui): Mention
the other relevant variables in the doc string (bug#50667).
2022-02-12 06:47:25 +01:00
Michael Albinus
bced4d26d9 Tolerate tilde in remote file names when needed
* lisp/net/tramp.el (tramp-tolerate-tilde): New defvar.
(tramp-handle-expand-file-name):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name):
Respect it.

* lisp/net/tramp-adb.el (tramp-adb-tolerate-tilde):
* lisp/net/tramp-sshfs.el (tramp-sshfs-tolerate-tilde): New defuns.
Advice `shell-mode' with them.
(tramp-methods) <sshfs>: Add "-t -t" to `tramp-login-args'.
2022-02-11 09:37:48 +01:00
Andrew G Cohen
48e8569c87 Allow searching of nnselect (search) groups
* lisp/gnus/gnus-group.el (gnus-group-make-search-group):
(gnus-group-read-ephemeral-search-group):  Ensure the server is
correctly identified even for nnselect groups.
* lisp/gnus/gnus-search.el (gnus-search-nnselect): New function.
(gnus-search-default-engines): Use it.
(gnus-search-make-spec): Queries from nnselect should always be raw.
* lisp/gnus/nnselect.el (gnus-search): Silence the byte-compiler.
2022-02-11 15:09:46 +08:00
Juri Linkov
437382734a * lisp/mouse.el (context-menu-map): Select only unselected window (bug#53910) 2022-02-10 20:57:42 +02:00
Juri Linkov
a6df8f9f99 * lisp/tab-line.el (tab-line-format): Use mode-line-window-selected-p.
Recently 'mode-line-window-selected-p' was added to
'tab-line-tab-name-format-default'.  Now add the same to another
place that handles the face 'tab-line-tab-current' (bug#53629).
2022-02-10 20:52:55 +02:00
Corwin Brust
64d211179d Autoload package-installed-p
* lisp/emacs-lisp/package.el (package-installed-p): Add autoload
cookie. (Bug#53885)

Copyright-paperwork-exempt: yes
2022-02-10 19:27:57 +02:00
Eli Zaretskii
2d897f7c66 Merge from origin/emacs-28
# Conflicts:
#	lisp/startup.el
2022-02-10 19:12:19 +02:00
Eli Zaretskii
c30106ce9f ; * lisp/startup.el (normal-top-level): Fix byte-compilation warning. 2022-02-10 19:05:41 +02:00
Alan Mackenzie
6548286446 Note current buffer and restore it in c-force-redisplay.
This fixes bug #52709.

* lisp/progmodes/cc-fonts.el (c-force-redisplay): New parameter BUFFER.  Set
current buffer to this before fontifying.
(c-fontify-new-found-type): Give the current buffer as argument to
run-with-timer.
2022-02-10 17:03:50 +00:00
Lars Ingebrigtsen
d64a1f7251 Restore command-line--load-script messaging
* lisp/startup.el (command-line--load-script): Restore previous
non-messaging behaviour.
2022-02-10 15:13:33 +01:00
Andrea Corallo
202d3be873 * lisp/startup.el (normal-top-level): Disable native-comp if not available 2022-02-10 14:26:29 +01:00
Michael Albinus
8ababad570 Improve handling of file modes in Tramp
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-get-remote-uid)
(tramp-gvfs-handle-get-remote-gid): Do not assume that the default
location is owned be the remote uid/gid.
(tramp-gvfs-handle-file-executable-p):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-executable-p):
Check also for setuid/setgid bit.

* lisp/net/tramp.el (tramp-check-cached-permissions): Check also
for ?s access type.  Check whether remote uid/gid are unknown.
2022-02-10 14:14:06 +01:00
Lars Ingebrigtsen
53da8c50fc Don't signal a backtrace on empty --script files
* lisp/startup.el (command-line--load-script): New function that
avoids erroring out if it turns out there's no forms in the buffer
(bug#4616).

* lisp/subr.el (delete-line): New utility function.
* lisp/international/mule.el (load-with-code-conversion): Accept
an eval function.
2022-02-10 13:44:55 +01:00
Dima Kogan
849895d0db Make comint-word actually check comint-file-name-quote-list
* lisp/comint.el (comint-word): We were checking for
comint-file-name-quote-list existing, but not actually comparing
to the characters in that list.  This patch actually checks the
contents of comint-file-name-quote-list (bug#53911).
2022-02-10 10:22:53 +01:00
Eli Zaretskii
d3c47011d5 Allow customization of the user's eln-cache directory
* lisp/startup.el (startup-redirect-eln-cache)
(startup--update-eln-cache): New functions.
(startup--original-eln-load-path): New defvar.
(normal-top-level): Record the original value of
'native-comp-eln-load-path' in 'startup--original-eln-load-path'.
Do not amend 'native-comp-eln-load-path' here, as that could
overwrite user customizations.
(command-line): Amend 'native-comp-eln-load-path' after loading
the early-init file, and then again after loading the user init
file.  (Bug#53891)

* etc/NEWS: Announce 'startup-redirect-eln-cache'.
2022-02-10 10:34:29 +02:00
Stefan Kangas
35bf8d4a02 Merge from origin/emacs-28
69e82968d7 Fix integer arithmetic miss-compilation (bug#53451)
31af9bca99 Mark flymake as compatible with emacs-26.1
2022-02-10 06:56:22 +01:00
Tassilo Horn
f063e38521 ; show-paren: improve previous commit bb69361cbe
Update show-paren--last-pos also in the "not at paren position" case.
Otherwise, we don't get the context info when moving point from a
paren position to a non-paren position and back again.
2022-02-09 20:48:02 +01:00
Andrea Corallo
69e82968d7 Fix integer arithmetic miss-compilation (bug#53451)
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-set-range-for-arithm):
When one of the two sources is negated revert to set dst as
number.
* test/src/comp-tests.el (comp-tests-type-spec-tests): Add test to
verify this is effective.
2022-02-09 17:58:57 +01:00
Michael Albinus
f06915c93c Tilde expansion is not possible for Tramp sshfs method
* lisp/net/tramp.el (tramp-handle-expand-file-name):
Tilde expansion is not possible.  (Bug#53847)
2022-02-09 17:02:29 +01:00
Tassilo Horn
bb69361cbe show-paren: Don't show context again after C-g-ing it away.
* lisp/paren.el (show-paren--last-pos): New variable.
(show-paren-function): Don't show context again after C-g-ing it away.
2022-02-09 15:15:32 +01:00
Antoine Levitt
2f80d8058b Improve the set-fill-column prompt
* lisp/simple.el (set-fill-column): Improve the prompt (bug#53874).
2022-02-09 10:53:19 +01:00
Lars Ingebrigtsen
65a61154d8 Make calendar-exit actually respect the KILL parameter
* lisp/calendar/calendar.el (calendar-exit): Really kill off all
the buffers (if requested) (bug#53870).
2022-02-09 09:32:50 +01:00
Stefan Kangas
9459399d58 Merge from origin/emacs-28
82e74e4559 flymake: Ensure compatibility with older Emacsen
2022-02-09 06:30:54 +01:00
Po Lu
d41a5e7e33 Improve selection of fonts available from `mouse-set-font'
People get confused on a build without font dialogs (such as a
Lucid build) if `menu-set-font' and `mouse-set-font' don't
present them a list of the fonts actually available on their
system.

* lisp/mouse.el (mouse-generate-font-name-for-menu)
(mouse-generate-font-menu): New functions.
(mouse-select-font): Allow the user to select from all fonts
available on the system.
(mouse-set-font): Use `mouse-select-font' to display font menu.
2022-02-09 11:27:15 +08:00
Tassilo Horn
2755e6bba0 Allow showing show-paren context in an overlay
* lisp/paren.el (show-paren-context-when-offscreen): Add new
possibility `overlay'.
(show-paren--context-overlay): New defvar.
(show-paren--delete-context-overlay): New function.
(show-paren--show-context-in-overlay): New function.
(show-paren-function): Handle the new `overlay' case.
* lisp/emacs-lisp/eldoc.el (eldoc-display-message-no-interference-p):
There's no interference if `show-paren-context-when-offscreen' is
overlay or child-frame.
2022-02-08 21:54:56 +01:00
Juri Linkov
f7d16d93fd * lisp/replace.el (perform-replace): Allow using isearch in recursive-edit.
Let-bind isearch-filter-predicate to the default value before calling
recursive-edit to allow using isearch in a recursive edit (bug#53758).
2022-02-08 21:35:12 +02:00
Robert Pluim
1ea2993e83 Improve make-frame-on-display initial values
* doc/emacs/frames.texi (Multiple Displays): Add index entry for
'display server'.
* lisp/frame.el (make-frame-on-display): Specify sensible initial
values when reading display name.
* lisp/menu-bar.el (menu-bar-file-menu): Use 'display server' rather
than 'display' to avoid monitor<->display confusion.
2022-02-08 17:09:15 +01:00
Robert Pluim
57df457492 Improve thing-at-point-url-at-point docstring
* lisp/thingatpt.el (thing-at-point-url-at-point): Correct description
of BOUNDS argument.
2022-02-08 17:09:15 +01:00
Michael Albinus
6058d3ebb4 Respect customization nature of `connection-local-*' user options
* lisp/files-x.el (connection-local-set-profiles)
(connection-local-set-profile-variables): Set user options via
`customize-set-variable'.
2022-02-08 16:23:05 +01:00
Robert Pluim
31af9bca99 Mark flymake as compatible with emacs-26.1
* lisp/progmodes/flymake.el: Bump package version and set
emacs version in Package-Requires to 26.1 (Bug#53853).
2022-02-08 16:04:15 +01:00