1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-18 11:50:38 -08:00
Commit graph

80499 commits

Author SHA1 Message Date
Stephen Berman
8f2f91f7ac Fix problem in HTML with bracketed characters
* lisp/textmodes/sgml-mode.el (sgml-tag-syntax-table): Use bracket
syntax for all Unicode bracket characters (bug#43941).
2021-06-14 14:57:57 +02:00
Andrea Corallo
31d40cab78 ;* lisp/emacs-lisp/bytecomp.el (byte-native-compiling): Typo fix. 2021-06-14 14:18:06 +02:00
Andrea Corallo
9389742eb6 * lisp/emacs-lisp/bytecomp.el (byte+native-compile): Update docstring. 2021-06-14 14:18:06 +02:00
Michael Albinus
6536112bdc Handle sensitive auto-save or backup remote files (Bug#45245)
* doc/misc/tramp.texi (Auto-save and Backup):
Describe tramp-allow-unsafe-temporary-files.
(Ad-hoc multi-hops): Use proper format.

* etc/NEWS: Mention confirmation for writing sensitive auto-save
or backup remote files to the local temporary directory..

* lisp/net/tramp-cache.el (tramp-dump-connection-properties):
Strengthen test.

* lisp/net/tramp.el (tramp-allow-unsafe-temporary-files): New defcustom.
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name): Don't expose sensible
auto-save or backup files on local temporary directory.  (Bug#45245)

* test/lisp/net/tramp-tests.el (tramp--test-always): New defalias.
(tramp-test10-write-region, tramp-test21-file-links)
(tramp--test--deftest-direct-async-process): Use it.
(tramp-test37-make-auto-save-file-name)
(tramp-test38-find-backup-file-name): Extend tests.
2021-06-14 11:25:13 +02:00
pillule
d0c7d8bc22 Improve handling of dedicated flag for side windows (Bug#48493)
* doc/lispref/windows.texi (Buffers and Windows): Mention the
special handling of side windows and add a reference.
(Buffer Display Action Alists): Say explicitly that
`display-buffer-in-side-window' is dedicating to side by default.
(Dedicated Windows): Add case (4) and explain its meaning, add
a reference.
(Displaying Buffers in Side Windows): Move the paragraph about
`switch-to-(prev|next)-buffer' into a new item to emphasize the
special meaning of dedication for side windows.
* lisp/window.el (set-window-buffer-start-and-point): Restore
side dedication.
(switch-to-prev-buffer, switch-to-next-buffer): Correct return
value that should be nil instead of the same buffer in case of
no change.
(delete-windows-on): Restore side dedication.
(replace-buffer-in-windows): Update the docstring, restore side
dedication.
(quit-restore-window): Rearrange the logic so that strongly
dedicated windows are eventually deleted first.  Restore the
side dedication.  In the final case try to
`switch-to-prev-buffer' before deleting a window (Bug#48367).
2021-06-14 09:59:11 +02:00
Lars Ingebrigtsen
2f7a115a9c Fix previous pulse.el fix
* lisp/cedet/pulse.el (pulse-reset-face): Fix up previous
pulse-reset-face change -- reset back to the start face
(bug#48936).
2021-06-13 15:38:52 +02:00
dick
55d7effbe1 Avoid an infinite loop in mml-expand-html-into-multipart-related
* lisp/gnus/mml.el (mml-expand-html-into-multipart-related):
Skip images with empty filename parts (bug#49001).
2021-06-13 15:02:27 +02:00
Lars Ingebrigtsen
00802c0cfe Reset the pulse face more fully in pulse-reset-face
* lisp/cedet/pulse.el (pulse-reset-face): Reset the :extend to nil
if there's no face given (bug#48936).
2021-06-13 14:49:07 +02:00
Eli Zaretskii
788e5cce4d Fix wording of recently added documentation
* etc/NEWS:
* lisp/simple.el (save-interprogram-paste-before-kill): Fix
wording of a recently added documentation.  (Bug#41168)
2021-06-13 15:47:31 +03:00
Lars Ingebrigtsen
407062c296 Allow save-interprogram-paste-before-kill to be a number
* doc/emacs/killing.texi (Clipboard): Document it.
* lisp/simple.el (save-interprogram-paste-before-kill): Extend
range (bug#41168).
(kill-new): Implement it (bug#41168).
2021-06-13 14:04:45 +02:00
Stefan Monnier
4c6554413d EIEIO: Promote the CLOS behavior over the EIEIO-specific behavior
Change docs to advertize `slot-value` rather than `oref`.
Change the implementation of `:initform` to better match the CLOS semantics,
while preserving the EIEIO semantics, but warn when encountering cases
where the two diverge.
Demote the mostly unused special semantics of `oref-default`
on non-class allocated slots.

* doc/misc/eieio.texi (Quick Start): Use `slot-value`.
(Accessing Slots): Move `slot-value` before `oref`.
Fix paren-typo in example (reported by pillule <pillule@riseup.net>).
(Introspection): Remove mention of `class-slot-initarg`.

* lisp/transient.el (transient--parse-group, transient--parse-suffix):
Don't use `oref-default` to get the default value.
(transient-lisp-variable): Init forms are evaluated.

* lisp/emacs-lisp/eieio.el (defclass): Warn about inapplicable
`:initarg` and about uses of init forms that are ambiguous.
(oref): Don't advertize the deprecated use of initargs as slot names.
(oref-default): Don't advertize the deprecated case where it returns the
initform's value.
(initialize-instance): Use `macroexp-const-p`.
* lisp/emacs-lisp/eieio-core.el (eieio--unbound): Rename from
`eieio-unbound`.
(eieio--unbound-form): New var.
(eieio--slot-override): Use it.
(eieio-defclass-internal): Use it.  Change `init` so it should always
be evaluated.
(eieio--known-class-slot-names): New var.
(eieio--eval-default-p): Rename from `eieio-eval-default-p`.
(eieio--perform-slot-validation-for-default): Use `macroexp-const-p` to
decide whether to skip the test.
(eieio--add-new-slot): Register slot in `eieio--known-class-slot-names`
when applicable.
(eieio-oref-default, eieio-oset-default): Add warning for unknown slots
and slots not known to be allocated to the class.
(eieio-default-eval-maybe): Delete function.  Use just `eval` instead.
(eieio-declare-slots): Allow slots to specify their allocation class.

* lisp/cedet/srecode/insert.el (point): Declare the slot instead of
moving the class definition before the slot's first use.
(srecode-template-inserter-point, srecode-insert-fcn):
Use nil instead of unbound for the `point` slot.

* lisp/cedet/srecode/compile.el (srecode-template-inserter):
Declare the `key` slot that all children should have.

* lisp/emacs-lisp/eieio-speedbar.el (eieio-speedbar)
(eieio-speedbar-directory-button, eieio-speedbar-file-button):
* lisp/emacs-lisp/eieio-custom.el (eieio-widget-test-class):
* lisp/emacs-lisp/chart.el (chart-bar):
* lisp/cedet/semantic/ede-grammar.el (semantic-ede-proj-target-grammar):
* lisp/cedet/semantic/db.el (semanticdb-project-database):
* lisp/cedet/semantic/db-javascript.el (semanticdb-table-javascript)
(semanticdb-project-database-javascript):
* lisp/cedet/semantic/db-el.el (semanticdb-table-emacs-lisp)
(semanticdb-project-database-emacs-lisp):
* lisp/cedet/semantic/db-ebrowse.el (semanticdb-table-ebrowse)
(semanticdb-project-database-ebrowse):
* lisp/cedet/ede/proj.el (ede-proj-project):
* lisp/cedet/ede/proj-obj.el (ede-proj-target-makefile-objectcode):
* lisp/cedet/ede/generic.el (ede-generic-project):
* lisp/cedet/ede/config.el (ede-project-with-config):
* lisp/cedet/ede/base.el (ede-target, ede-project):
* lisp/auth-source.el (auth-source-backend): Init forms are evaluated,
so quote them accordingly.
2021-06-12 16:22:03 -04:00
Robert Pluim
0afab352e0 Make `window-system-for-display' work for ipv6, too
* lisp/term/x-win.el (display-format-alist): Also work for ipv6
(bug#42045).
2021-06-12 15:11:56 +02:00
Lars Ingebrigtsen
099c7a0c05 Clarify some browse-url doc strings
* lisp/net/browse-url.el (browse-url-of-file)
(browse-url-of-buffer, browse-url-of-region, browse-url)
(browse-url-at-point, browse-url-at-mouse): Clarify doc strings
(bug#42432).
2021-06-12 15:07:07 +02:00
Tassilo Horn
b425966b07 Use file-in-directory-p instead of obsolete dired-in-this-tree-p
* lisp/dired-aux.el (dired-rename-subdir,dired-rename-subdir-1)
(dired-insert-subdir,dired-insert-subdir-validate)
(dired-kill-tree,dired-tree-down): Use file-in-directory-p instead of
obsolete dired-in-this-tree-p.
2021-06-12 14:53:15 +02:00
Lars Ingebrigtsen
6b5a7136ca Fix double (recursive) load of fortran.el
* lisp/progmodes/fortran.el (fortran-menu): Move menu creation to
the end to avoid a recursive load (bug#43116).
2021-06-12 14:44:54 +02:00
Stefan Monnier
e775ef2f57 * lisp/emacs-lisp/benchmark.el (benchmark-elapse): Tweak 2021-06-11 14:06:29 -04:00
Harald Jörg
87bd14ca8b ; perl-mode.el: Allow newline between quote-likes and delimiter
* lisp/progmodes/perl-mode.el (perl-syntax-propertize-function):
Allow newline between a quote-like operator and its delimiter
(Bug#22355).

* test/lisp/progmodes/cperl-mode-tests.el (cperl-test-bug-22355):
Test case for the fix.

* test/lisp/progmodes/cperl-mode-resources/cperl-bug-22355.pl:
Test resource for a quote-like with newline before the delimiter.
2021-06-11 13:55:08 +02:00
Martin Rudalics
00140ca6bf Rename/rewrite recently added option and function in window.el
* lisp/window.el (window-at-x-y): Rename from `window-at-pos'.
Fix doc-string.
(delete-window-choose-selected): Rename from
`delete-window-set-selected'.  Fix doc-string.
(delete-window): Adjust to above renaming.
* doc/emacs/windows.texi (Change Window): Mention new option
`delete-window-choose-selected'.
* etc/NEWS:
* doc/lispref/windows.texi (Deleting Windows): Follow up on
above renamings.
2021-06-11 09:55:02 +02:00
Dmitry Gutov
86309efb4a Simplify vc-git-log-switches's usage; change default value to nil
* lisp/vc/vc-git.el (vc-git-log-switches):
Do not mention or allow the value 't' anymore
(https://lists.gnu.org/archive/html/emacs-devel/2021-06/msg00452.html).
(vc-git-print-log): Use 'vc-git-log-switches' directly.
2021-06-11 04:39:34 +03:00
Martin Rudalics
b3dd0ce75b Provide new option `delete-window-set-selected' (Bug#47300)
When `delete-window' deletes its frame's selected window, this new
option allows to choose another window as replacement.

* lisp/window.el (get-lru-window, get-mru-window)
(get-largest-window): New optional argument NO-OTHER.
(window-at-pos): New function.
(delete-window-set-selected): New option.
(delete-window): Handle `delete-window-set-selected'.
* src/window.c (Fdelete_window_internal): Set the selected
window of WINDOW's frame to the first window on that frame and
let `delete-window' choose a more suitable window instead.
* doc/lispref/windows.texi (Deleting Windows): Describe new
option `delete-window-set-selected'.
(Cyclic Window Ordering): Describe new NO-OTHER argument for
`get-lru-window', `get-mru-window' and `get-largest-window'.
* etc/NEWS: Mention `delete-window-set-selected' and the NO-OTHER
argument.
2021-06-10 09:14:21 +02:00
Harald Jörg
dd9385b404 ; perl-mode.el: Detect quote-like operator immediately after =>
* lisp/progmodes/perl-mode.el (perl-syntax-propertize-function):
Detect a quotelike operator immediately after a fat comma "=>"
(Bug#25098)

* test/lisp/progmodes/cperl-mode-tests.el (cperl-test-bug-25098):
Test case for the bug with code from the bug report.

* test/lisp/progmodes/cperl-mode-resources/cperl-bug-25098.pl:
Resource file for the test.
2021-06-09 23:04:09 +02:00
Jason Kim
e67883bc2b Handle auto-cd in shell-mode
* lisp/shell.el (shell-has-auto-cd): New defcustom.
(shell-directory-tracker): Handle implicit "cd".

Copyright-paperwork-exempt: yes
2021-06-09 11:44:34 +02:00
Utkarsh Singh
4a1e97bea9 New user option for Git log switches
* lisp/vc/vc-git.el (vc-git-diff-switches): New defcustom.
(vc-git-print-log): Use it.

* etc/NEWS: Announce the new option.

Copyright-paperwork-exempt: yes
2021-06-09 02:25:47 +03:00
Harald Jörg
90f54aad5e ; perl-mode.el: Detect regexes immediately after "|&"
* lisp/progmodes/perl-mode.el (perl-syntax-propertize-function):
Add "|&" to the list of characters after which a slash starts a
regular expression (Bug#23992).

* test/lisp/progmodes/cperl-mode-tests.el (cperl-test-ppss):
Correct the docstring.
(cperl-test-bug-23992): New test for Bug#23992.
(cperl-test-bug-42168): Adapt inline comments to the current code.

* test/lisp/progmodes/cperl-mode-resources/cperl-bug-23992.pl:
Resource file with example code from the bug report.
2021-06-08 23:23:25 +02:00
Juri Linkov
9625e3026b * lisp/simple.el (yank-from-kill-ring): Add edited string to the kill-ring.
(Bug#48478)
2021-06-08 19:54:17 +03:00
Juri Linkov
15f4237303 Sync overlay code in minibuffer-message and set-minibuffer-message (bug#48669)
* lisp/minibuffer.el (minibuffer-message): Copy more overlay positioning code
from set-minibuffer-message.
(minibuffer--message-overlay-pos): Mention both minibuffer-message and
set-minibuffer-message in the docstring.
(set-minibuffer-message): Use 'cursor t' instead of 1.
2021-06-08 19:51:51 +03:00
Alex Bochannek
4888addd30 Change the Gnus default to use `#' to toggle the process mark
* doc/misc/gnus.texi (Marking Groups, Topic Commands):
(Setting Process Marks, Pick and Read): Document the new default.
* lisp/gnus/gnus-group.el (gnus-group-make-menu-bar): Update menu.

* lisp/gnus/gnus-sum.el (gnus-summary-make-menu-bar): Update menu.

* lisp/gnus/gnus-topic.el (gnus-topic-make-menu-bar): Update menu.

* lisp/gnus/gnus.el (gnus-process-mark-toggle): Change default.
2021-06-08 13:34:24 +02:00
Stephen Gildea
0d42c92978 MH-E: do not look for MH variants in relative directories
* lisp/mh-e/mh-e.el (mh-variants): Do not examine relative directories
in exec-path (e.g., "."); these won't have MH installed.  Also,
file-chase-links is not robust with relative names: you cannot pass it
a relative name that is a symlink.
2021-06-07 21:47:24 -07:00
Stefan Kangas
19ef864084 Fix an example in ERC docs
* doc/misc/erc.texi (Connecting):
* lisp/erc/erc.el (erc, erc-tls): Fix example to use J. Random Hacker
instead of Harry S. Truman.
2021-06-08 02:00:29 +02:00
Michael Albinus
fcc827619f Improve support of remote files in browse-url.el
* etc/NEWS: Mention support of remote file browsing.

* lisp/net/browse-url.el (browse-url-of-buffer): Revert last change.
(browse-url-of-file): Use temporary file in case of remote file.
(Bug#48397)
2021-06-07 20:41:30 +02:00
Dmitry Gutov
722064022c Fix rgrep abbreviation
* lisp/progmodes/grep.el (grep-mode-font-lock-keywords):
Update for the last change in grep-find-template (bug#48471).
2021-06-07 15:03:21 +03:00
Michael Albinus
c8d4af8637 Support remote file names in `browse-url-of-buffer'
* lisp/net/browse-url.el (browse-url-of-buffer): Use temporary
file in case of remote `file-name'.  (Bug#48397)
2021-06-07 13:45:38 +02:00
Dmitry Gutov
45bdc37c81 Support old BSD find and "root dir symlink" better
* lisp/progmodes/grep.el (grep-compute-defaults):
Add '-H' to grep-find-template (bug#48471).

* lisp/cedet/semantic/symref/grep.el (semantic-symref-perform-search):
Pass the root directory name without the trailing slash.

* lisp/progmodes/xref.el (xref-matches-in-directory): Ditto.

* test/lisp/progmodes/xref-tests.el (xref--xref-file-name-display-is-abs)
(xref--xref-file-name-display-is-relative-to-project-root):
Make tests more strict again.
2021-06-07 04:52:30 +03:00
Dmitry Gutov
6329e70460 completion-pcm--hilit-commonality: Reuse the match-data cons cells
* lisp/minibuffer.el (completion-pcm--hilit-commonality): Reuse
the match-data cons cells for better performance (bug#48841).
2021-06-07 00:57:50 +03:00
Eli Zaretskii
fc37483617 Fix a problem with restarting 'tags-search'
* lisp/progmodes/etags.el (tags-search, tags-query-replace): Link
to 'fileloop-continue' instead of 'tags-loop-continue', for
continuing TAGS-based search/replace commands.

* lisp/fileloop.el (fileloop-continue): Reset
'switch-to-buffer-preserve-window-point' to nil when switching to
another buffer, so as to make sure a new search always restarts
from point-min in each buffer it searches.  (Bug#48628)
2021-06-06 15:29:18 +03:00
Lars Ingebrigtsen
0f9d8c9381 Clarify boolean widget prompt
* lisp/wid-edit.el (widget-boolean-prompt-value): Clarify prompt
(bug#43593).
2021-06-06 13:21:25 +02:00
Lars Ingebrigtsen
929adad22b Clarify file reversion prompt
* lisp/files.el (revert-buffer--default): Clarify prompt when the
buffer is modified (bug#43884).
2021-06-06 13:04:12 +02:00
Lars Ingebrigtsen
3c2db0c541 Make so-long' restore view-mode'
* lisp/so-long.el (so-long): Make the `v' command in Dired work
more reliably (bug#45084).
2021-06-06 12:33:21 +02:00
Michael Albinus
218d2d1509 * lisp/net/tramp.el (tramp-error): Make it a defun. 2021-06-06 08:38:40 +02:00
João Távora
45d711a356 Consider environment vars in Fido's directory-aware RET binding
Fixes: bug#48782

* lisp/icomplete.el (icomplete-fido-ret): Consider environment
variables in dir expansion.
2021-06-05 21:47:57 +01:00
Alex Bochannek
4fda37fc7d Fix Gnus summary exclusion when everything matches
* lisp/gnus/gnus-sum.el (gnus-summary-limit-to-recipient):
* lisp/gnus/gnus-sum.el (gnus-summary-limit-to-subject):
(gnus-summary-limit-to-address, gnus-summary-limit-to-extra):
Don't claim that there aren't any matches when everything matches
an exclusion (bug#48834).
2021-06-05 22:30:36 +02:00
Stefan Monnier
e490ffcf95 * lisp/mpc.el (mpc-intersection): Fix commit 1760029b09 2021-06-05 11:56:01 -04:00
Eli Zaretskii
3eb294745c Some additions to the TeX input method
* lisp/leim/quail/latin-ltx.el (latin-ltx--define-rules): Add some
rules from Unicode Technical Note 28 "UnicodeMath" v3.1.
2021-06-05 11:28:26 +03:00
Dmitry Gutov
8d5b7f519f Make icomplete less blinky and more responsive
* lisp/icomplete.el (icomplete-pre-command-hook, icomplete-tidy):
Remove, update the callers
(https://lists.gnu.org/archive/html/emacs-devel/2021-06/msg00111.html).
(icomplete-compute-delay): Change the default to 150ms.
(icomplete-max-delay-chars): Change the default to 2.
2021-06-05 03:56:33 +03:00
Tassilo Horn
7b50ed553f Ask if dir and subdir dired buffers be killed when deleting dir
Previously, when you've had dired buffers

  ~/foo/
  ~/foo/bar/
  ~/foo/bar/baz/

and then deleted ~/foo/, dired (with dired-clean-up-buffers-too set to
non-nil) would only ask to delete the dired buffer of ~/foo/.  Now it
will offer to delete all three buffers.

* lisp/dired.el (dired-buffers-for-dir): Add optional argument SUBDIRS
which makes the function return also dired buffers showing a subdir of
DIR.
(dired-in-this-tree-p): Make obsolete in favor of file-in-directory-p
which actually does what the name suggest whereas dired-in-this-tree-p
is just string-matching on filenames which will fail with symlinks
filenames including ./ or ../.
2021-06-04 21:58:11 +02:00
Stephen Berman
194d54a929 Fix placement of point in Dired deletion operations
* lisp/dired.el (dired-do-flagged-delete, dired-do-delete): Use
point-marker instead of point to record each file name position.
Clean up the markers before returning.
(dired-internal-do-deletions): Move to the file name marker, and
then move point to the file name to visually emphasize which file
is being operated on (bug#48805).
2021-06-04 12:01:41 +02:00
Harald Hanche-Olsen
9136c064d6 Add a new `server-edit-abort' command
* doc/emacs/misc.texi (Invoking emacsclient): Document it (bug#11358).

* lisp/server.el (server-edit): Mention it in the doc string.
(server-edit-abort): New command.

Copyright-paperwork-exempt: yes
2021-06-04 11:09:46 +02:00
Lars Ingebrigtsen
6d1d048d65 Revert "Make the `i' command in Info-mode remove duplicate matches"
This reverts commit 089e0c4c55.

There were no duplicate entries -- there were two entries
for different things that referred to the same line.
2021-06-04 10:48:16 +02:00
Eli Zaretskii
b516887283 Fix documentation of recent 'windmove' changes
* lisp/windmove.el (windmove-default-keybindings)
(windmove-display-default-keybindings)
(windmove-delete-default-keybindings)
(windmove-swap-states-default-keybindings): Improve doc strings.
(Bug#41438)

* etc/NEWS: Fix a typo in the 'windmove' entry.
2021-06-04 09:48:13 +03:00
Juri Linkov
15c57fc4cc * lisp/simple.el (read-from-kill-ring): Fix the case of 'M-y M-p' (bug#48478)
Don't use offsets for read-from-kill-ring-history when kill-ring-yank-pointer
points to the last element of kill-ring.
2021-06-03 23:54:30 +03:00