Glenn Morris
653848a277
Improve recent jka-compr-compression-info-list change
...
* lisp/jka-cmpr-hook.el (jka-compr-compression-info-list):
Document previous change, and fix :type.
2021-07-15 13:19:48 -07:00
Tassilo Horn
f770538b30
Add bug-reference support for Codeberg projects
...
* lisp/progmodes/bug-reference.el (bug-reference-setup-from-vc-alist):
Add support for codeberg.org bug and pull request references.
* doc/emacs/maintaining.texi (Bug Reference): Mention that bug and
pull request references for codeberg projects are supported.
2021-07-15 21:51:54 +02:00
Tassilo Horn
ec3b108c1f
Add support for sourcehut to bug-reference.el
...
* lisp/progmodes/bug-reference.el (bug-reference-setup-from-vc-alist):
Add support for bug references like #17 and ~user/project#19 for
sourcehut (sr.ht).
* doc/emacs/maintaining.texi (Bug Reference): Document sourcehut
support.
2021-07-15 21:43:29 +02:00
Ori
eaefa44acd
; * lisp/help-fns.el: Speed up `describe-mode'
...
* lisp/help-fns.el (help-fns--list-local-commands): Speed up (bug#49579).
A predicate checks if there are no key bindings for a given function. A
full list of bindings is not needed, even a single binding is sufficient
to say the function is bound. Set FIRSTONLY arg in where-is-internal so
this predicate runs faster, with functional equivalence. For some
configurations this has a noticeable improvement on the speed of
describe-mode.
Copyright-paperwork-exempt: yes
2021-07-15 18:57:38 +02:00
Lars Ingebrigtsen
8f5738eb8f
Add more car/cdr examples to shortdoc
...
* lisp/emacs-lisp/shortdoc.el (list): Add more car/cdr examples.
2021-07-15 18:32:34 +02:00
Lars Ingebrigtsen
22a5482ab6
Improve the shortdoc link action in *Help* buffers
...
* lisp/emacs-lisp/shortdoc.el (shortdoc-display-group): Allow
taking an optional parameter to place point on a specific function.
(shortdoc--display-function): Go to the function in question in
the shortdoc buffer.
2021-07-15 18:29:27 +02:00
Lars Ingebrigtsen
ceecac4c79
Add new user option to abbreviate file names in save-place
...
* lisp/saveplace.el (save-place-abbreviate-file-names): New user
option (bug#13286).
(save-place-to-alist): Use it.
2021-07-15 18:03:36 +02:00
Lars Ingebrigtsen
fbc9a50993
Allow restoring the original order in 'tabulated-list-mode'
...
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-sort): Allow
restoring the original order (bug#13411).
(tabulated-list--sort-by-column-name): Store the original order.
(tabulated-list--original-order): New buffer-local variable.
2021-07-15 17:37:58 +02:00
Lars Ingebrigtsen
5260f1f2c3
Autoload `split-string-shell-command'
...
* lisp/shell.el (split-string-shell-command): Autoload.
2021-07-15 17:04:26 +02:00
Eli Zaretskii
9eee02886d
; * lisp/gnus/message.el (message-signature-separator): Add :version.
2021-07-15 12:22:27 +03:00
Lars Ingebrigtsen
4aac8f60e6
Mention more split-string-* functions in shortdoc
...
* lisp/emacs-lisp/shortdoc.el (string): Mention
split-string-and-unquote and split-string-shell-command.
2021-07-15 10:37:11 +02:00
Lars Ingebrigtsen
eb4a120ea5
Allow using spaces in `inferior-lisp' command names
...
* lisp/progmodes/inf-lisp.el (inferior-lisp): Allow using spaces
in the command names (by splitting using shell syntax) (bug#16005).
2021-07-15 10:33:22 +02:00
Lars Ingebrigtsen
28e7b51041
Rename shell-split-string to split-string-shell-command
...
* lisp/shell.el (split-string-shell-command):
* doc/lispref/processes.texi (Shell Arguments): Rename from
shell-split-string.
2021-07-15 10:29:04 +02:00
Lars Ingebrigtsen
4fb6cf3f38
Add a new function 'shell-split-string'
...
* doc/lispref/processes.texi (Shell Arguments): Document it.
* lisp/shell.el (shell-split-string): New function.
2021-07-15 10:25:41 +02:00
Michael Albinus
525d5cab36
Preserve backward compatibility in Tramp
...
* lisp/net/tramp-crypt.el (tramp-crypt-handle-lock-file)
(tramp-crypt-handle-unlock-file): Preserve backward compatibility.
* lisp/net/tramp-sh.el (tramp-sh-handle-write-region): Do not
create lock file twice.
* lisp/net/tramp.el (tramp-handle-make-lock-file-name): Move lock
file security check ...
(tramp-handle-lock-file): ... here.
(tramp-handle-unlock-file): Preserve backward compatibility.
* test/lisp/net/tramp-tests.el (lock-file-name-transforms)
(remote-file-name-inhibit-locks): Declare.
(tramp-allow-unsafe-temporary-files): Set to t.
(tramp-test37-make-auto-save-file-name)
(tramp-test38-find-backup-file-name): Move binding of
`tramp-allow-unsafe-temporary-files' up.
(tramp-test39-lock-file): Bind `tramp-allow-unsafe-temporary-files'.
Preserve backward compatibility. Extend test.
2021-07-14 18:36:14 +02:00
Lars Ingebrigtsen
f45710e1dd
Fontify the signature separator in Message mode
...
* lisp/gnus/message.el (message-signature-separator): New face
(bug#17757).
(message-font-lock-keywords): Add it to the signature, and ensure
that the trailing space isn't removed when hitting RET.
(message--match-signature): New helper function.
2021-07-14 18:08:33 +02:00
Lars Ingebrigtsen
6309cae3f2
Clarify backward-delete-char-untabify doc string
...
* lisp/simple.el (backward-delete-char-untabify): Mention the
effect of Transient Mark mode (bug#17263).
2021-07-14 17:10:24 +02:00
Lars Ingebrigtsen
9a534506ba
switch-to-buffer-other-frame doc string improvement
...
* lisp/window.el (switch-to-buffer-other-frame): Document that we
don't always display the buffer in a different frame (bug#17719).
2021-07-14 16:40:18 +02:00
Lars Ingebrigtsen
6ff726362d
Fix hilit-chg highlighting of characters where text has been removed
...
* lisp/hilit-chg.el (hilit-chg-set-face-on-change): Remove
highlighting from characters that are just highlighted because of
something that has been previously deleted (bug#17784).
2021-07-14 16:40:18 +02:00
Lars Ingebrigtsen
c218aa5b53
Make `apropos-library' also work for libraries without symbols
...
* lisp/apropos.el (apropos--preamble): Factor out (bug#17832)...
(apropos-print-doc): ... from here.
(apropos-library): Use it to display the apropos buffer even if it
has no symbols of its own.
2021-07-14 12:11:52 +02:00
Juri Linkov
dd34bef7d3
Revert e061999559 that added save-match-data.
...
* lisp/isearch.el (isearch-filter-predicate): Mention precautions against
clobbering the match data in docstring (bug#49534).
2021-07-14 02:21:17 +03:00
Juri Linkov
e061999559
* lisp/isearch.el: Add save-match-data for funcall isearch-filter-predicate.
...
* lisp/isearch.el (isearch-search): Add save-match-data before
funcall isearch-filter-predicate.
(isearch-lazy-highlight-search): Add save-match-data before
funcall isearch-filter-predicate.
(Bug#49534)
2021-07-14 01:29:53 +03:00
Lars Ingebrigtsen
f339cc3b81
Add a better interactive spec to `facemenu-add-face'
...
* lisp/facemenu.el (facemenu-add-face): Use `read-face-name'
(bug#18369) by copying over the interactive spec from
facemenu-set-face.
2021-07-14 00:12:45 +02:00
Lars Ingebrigtsen
a5d1bd6a6d
Make jka-compr-insert-file-contents slightly more efficient
...
* lisp/jka-compr.el (jka-compr-insert-file-contents): Make more
efficient by using `insert-into-buffer'.
2021-07-13 23:48:04 +02:00
Lars Ingebrigtsen
210b10f3fe
Add new function 'insert-into-buffer'
...
* doc/lispref/text.texi (Insertion): Document it.
* lisp/subr.el (insert-into-buffer): New function.
2021-07-13 23:46:16 +02:00
Lars Ingebrigtsen
3ce37f5afa
Fall back on zlib-decompress-region if gzip doesn't exist
...
* lisp/jka-cmpr-hook.el (jka-compr-info-uncompress-function): New
function (bug#18823).
(jka-compr-compression-info-list): Expand info with decompression
function.
* lisp/jka-compr.el (jka-compr-insert-file-contents): Fall back on
internal decompression function if external doesn't exist.
2021-07-13 23:23:11 +02:00
Daniel Martín
e368f56037
Fix dired-number-of-marked-files when there are no marked files
...
* lisp/dired.el (dired-number-of-marked-files): Fix if expression so
that the else part is evaluated correctly.
2021-07-13 22:40:12 +02:00
Lars Ingebrigtsen
eae23d60f8
Allow not updating Customize settings in set-frame-font
...
* lisp/frame.el (set-frame-font): Allow not updating the
Customization settings (bug#19298).
2021-07-13 21:48:49 +02:00
Juri Linkov
35a8861619
Support Isearch filter predicates with empty search hits (bug#49534)
...
* lisp/isearch.el (isearch-search): Move (= (match-beginning 0) (match-end 0))
and (bobp)/(eobp) outside the call to isearch-filter-predicate.
Use forward-char 1/-1 on empty matches only when going to retry search.
(isearch-lazy-highlight-search): Remove (= (point) bound),
but leave (= (match-beginning 0) (match-end 0)) since empty matches
make no sense in lazy-highlighting.
2021-07-13 22:25:05 +03:00
Lars Ingebrigtsen
b68e7a64ae
Make 'tex-validate-buffer' work again
...
* lisp/textmodes/tex-mode.el (tex-validate-buffer): The *Occur*
buffer is read-only, so inhibit that before inserting things into
it (bug#19326).
2021-07-13 20:13:26 +02:00
Michael Albinus
1e96b97e3c
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
2021-07-13 19:50:30 +02:00
Michael Albinus
cce84822f7
Add remote-file-name-inhibit-locks
...
* doc/emacs/files.texi (Interlocking):
* doc/lispref/files.texi (File Locks):
* doc/misc/tramp.texi (Auto-save File Lock and Backup):
Add remote-file-name-inhibit-locks.
* etc/NEWS: New user option 'remote-file-name-inhibit-locks'.
* lisp/files.el (remote-file-name-inhibit-locks): New defcustom.
* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
* lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
* lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
Use `tramp-handle-make-lock-file-name'.
* lisp/net/tramp.el (tramp-allow-unsafe-temporary-files): Fix docstring.
(tramp-handle-make-lock-file-name): New defun.
* test/lisp/net/tramp-tests.el (tramp-test39-lock-file): Extend test.
2021-07-13 19:50:05 +02:00
Lars Ingebrigtsen
5afe27624f
Add new user option to avoid piling on Dired buffers
...
* doc/emacs/dired.texi (Dired Visiting): Document it.
* lisp/dired.el (dired-kill-when-opening-new-dired-buffer): New
user option (bug#20598).
(dired-up-directory, dired-find-file): Use it.
(dired--find-possibly-alternative-file): New convenience command
to respect the user option.
2021-07-13 19:49:50 +02:00
Michael Albinus
bfd159539f
Fix a problem with tramp-*-process-file
...
* 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):
Use `(expand-file-name default-directory)'.
2021-07-12 15:49:50 +02:00
Juri Linkov
352baac72f
* lisp/textmodes/enriched.el: Require 'facemenu' (bug#49466)
2021-07-12 02:45:51 +03:00
Eric Abrahamsen
e25c1b5cd3
Further tweaks to gnus-search-query-expand-key
...
* lisp/gnus/gnus-search.el (gnus-search-query-expand-key): It's
possible that KEY could be partially completed (ie no longer string=
to COMP), but not all the way. Use a more accurate test. Add
docstring.
2021-07-11 09:05:04 -07:00
Michael Albinus
ad6ad1646d
Use `auto-save-file-name-p' in tramp-*-write-region
...
* lisp/net/tramp.el (tramp-handle-write-region):
* lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
* lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
* lisp/net/tramp-smb.el (tramp-smb-handle-write-region):
* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-write-region):
Use `auto-save-file-name-p'.
2021-07-11 17:41:33 +02:00
Basil L. Contovounesios
46f9949e1f
; Fix misspellings of 'occurrence' in docs.
2021-07-11 11:55:31 +01:00
Eric Abrahamsen
d93ff9459f
Rewrite gnus-search-query-expand-key
...
* lisp/gnus/gnus-search.el (gnus-search-query-expand-key): There was a
misunderstanding about how completion-all-completion works (if the
test string can't be completed, the whole table is returned). Simplify
to use try-completion.
* test/lisp/gnus/gnus-search-tests.el (gnus-s-expand-keyword): Ensure
that an unknown/uncompletable keyword is returned unmolested.
2021-07-10 20:22:35 -07:00
Eric Abrahamsen
e7f6bb38dd
Rework gnus-search-indexed-parse-output
...
* lisp/gnus/gnus-search.el (gnus-search-indexed-parse-output): Be more
careful about matching filesystem paths to Gnus group names; make
absolutely sure that we only return valid article numbers.
2021-07-10 20:22:34 -07:00
Lars Ingebrigtsen
da7dbfdf68
Make package-menu-filter-by-status work as documented
...
* lisp/emacs-lisp/package.el (package-menu-filter-by-status): Work
as documented (bug#49474).
2021-07-10 18:53:28 +02:00
Stefan Monnier
b423848b5e
* lisp/facemenu.el: Preload the C-mouse-2 menu binding
2021-07-09 15:53:38 -04:00
Michael Albinus
9ce6541ac9
Further cleanup for file locks
...
* doc/misc/tramp.texi (Top, Configuration): Adapt node name for
file locks.
(Auto-save File Lock and Backup): Rename node name and section
title. Add file-lock to @cindex. Describe file locks.
* lisp/dired.el (dired-trivial-filenames): Add lock files.
(dired-font-lock-keywords): Move files suffixed with
`completion-ignored-extensions' up. Add lock files to these checks.
* lisp/net/tramp.el (tramp-get-lock-file, tramp-handle-unlock-file):
Use `when-let'
(tramp-lock-file-info-regexp): Rename from
`tramp-lock-file-contents-regexp'.
(tramp-handle-file-locked-p, tramp-handle-lock-file): Adapt callees.
(tramp-handle-lock-file): Set file modes of lockname.
* src/buffer.c (Frestore_buffer_modified_p):
* src/fileio.c (write_region):
* src/insdel.c (prepare_to_modify_buffer_1): Call Flock_file.
* src/filelock.c (Qmake_lock_file_name): Declare symbol.
(make_lock_file_name): Use it. Don't check Fboundp, it doesn't
work for interned symbols.
(lock_file): Return a Lisp_Object. Don't check create_lockfiles.
Remove MSDOS version of the function.
(Flock_file): Check create_lockfiles.
(Flock_buffer): Call Flock_file.
* src/lisp.h (lock_file): Remove.
* test/lisp/shadowfile-tests.el (shadow-test08-shadow-todo)
(shadow-test09-shadow-copy-files): Let-bind `create-lockfiles'.
* test/lisp/net/tramp-tests.el (create-lockfiles): Don't set it
globally.
(tramp-test39-lock-file): Check also for `set-visited-file-name'.
2021-07-09 18:14:19 +02:00
Eli Zaretskii
2870a72d0d
Partially restore the lost C-mouse-2 drop-down menu
...
This allows to pop up the Text Properties menu once facemenu is
loaded. It still doesn't allow C-mouse-2 clicks without manually
loading facemenu; FIXME.
* lisp/facemenu.el (global-map) <C-down-mouse-2>: Add back the
removed binding. (Bug#49466)
2021-07-09 14:37:49 +03:00
Stefan Monnier
c73bc89e66
* lisp/outline.el (outline-mode-cycle-map): Don't bind tab.
...
Since it would take precedence over bindings for TAB in higher
precedence maps.
2021-07-08 23:00:03 -04:00
Michael Albinus
a6a92e3ac5
Code cleanup wrt file locks
...
* lisp/files.el (make-lock-file-name): Fix docstring.
* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist):
* lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
* lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
* lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
Add `make-lock-file-name'.
* lisp/net/tramp.el (tramp-file-name-for-operation):
Add `make-lock-file-name'.
(tramp-handle-unlock-file): Call `userlock--handle-unlock-error'
in case of error.
* src/buffer.c (Frestore_buffer_modified_p):
* src/editfns.c (Freplace_buffer_contents):
* src/fileio.c (Finsert_file_contents, write_region): Call Funlock_file.
* src/filelock.c (unlock_file): Rename from unlock_file_body.
Remove the other declarations of unlock_file. Move file name
handler check to ...
(Funlock_file): ... here. Adapt argument numbers. Call
unlock_file wrapped by internal_condition_case.
(Flock_file): Adapt argument numbers.
(unlock_all_files, Funlock_buffer, unlock_buffer): Call Funlock_file.
* src/lisp.h (unlock_file): Remove.
2021-07-08 21:13:40 +02:00
Juri Linkov
274e71f5cc
Don't turn mouse-1 into mouse-2 when clicking on the tab-line (bug#49247)
...
* lisp/tab-line.el (tab-line-tab-name-format-default): For 'tab-line-tab-map'
add the property 'follow-link' with the value 'ignore'.
2021-07-08 20:51:15 +03:00
pillule
57354bc64b
Use display-buffer with re-builder (bug#49069)
...
* lisp/emacs-lisp/re-builder.el (re-builder): Uses 'display-buffer'
with 'display-buffer-in-direction' to display the reb-buffer. This
allow user-customizations and using it on not splitables windows.
Add a dedication to its window so killing this buffer quit the window.
2021-07-08 20:39:39 +03:00
Lars Ingebrigtsen
8ab0c04c2c
Make desktop-kill more robust
...
* lisp/desktop.el (desktop-kill): Allow exiting Emacs even if we
can't delete the desktop file (bug#20762).
2021-07-08 16:33:28 +02:00
Lars Ingebrigtsen
cd1313b7f1
Allow inhibiting inserting #! in sh-set-shell
...
* lisp/progmodes/sh-script.el (sh-set-shell): Allow inhibiting
inserting the #! line (bug#20959).
2021-07-08 16:23:29 +02:00