Move vc-branch-p and vc-branch-part from vc.el to vc-rcs.el and rename
* lisp/vc/vc-rcs.el (vc-rcs-branch-p): Renamed from `vc-branch-p'
(old name made into obsolete alias) and moved from vc.el.
(vc-rcs-branch-part): Renamed from `vc-branch-part'
(old name made into obsolete alias) and moved from vc.el.
Augusto Stoffel [Sun, 29 Aug 2021 18:56:11 +0000 (20:56 +0200)]
Add support for OSC 7 in comint (current directory tracking)
* lisp/comint.el (comint-osc-directory-tracker, comint-osc-handlers):
Define and register a handler for OSC 7.
(comint-osc-process-output): Do fewer checks on
'comint-last-output-start'.
Alan Mackenzie [Sun, 29 Aug 2021 14:03:57 +0000 (14:03 +0000)]
C++ Mode: handle compound identifiers preceding brace lists correctly
* lisp/progmodes/cc-engine.el (c-looking-at-or-maybe-in-bracelist): early in
function, check alternatively for c-back-over-compound-identifier when doing
c-backward-token-2.
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-init-header):
Don't overly truncate headers that are before a right-aligned
column (bug#44594).
(tabulated-list--available-space): Separated out into own
function...
(tabulated-list-print-col): ... from here.
Put advice documentation at the end of the displayed doc string
* lisp/emacs-lisp/nadvice.el (advice--make-docstring): Put the
advice things at the end of the documentation (bug#50222). It's
important to have the first line of the original documentation
remain the first line, because it's used when doing one-line
summaries of the function.
Juri Linkov [Fri, 27 Aug 2021 06:24:07 +0000 (09:24 +0300)]
Replace flyspell-use-mouse-3-for-menu with context-menu-mode (bug#50067)
* doc/emacs/fixit.texi (Spelling): Replace mentions of
flyspell-use-mouse-3-for-menu with context-menu-mode.
* lisp/mouse.el (context-menu-map): Use the function from the
text property context-menu-function at mouse click event.
* lisp/textmodes/flyspell.el (flyspell--set-use-mouse-3-for-menu):
Remove function.
(flyspell-use-mouse-3-for-menu): Remove defcustom added recently in 28.1.
(flyspell-context-menu): New function.
(flyspell-mode): Don't call flyspell--set-use-mouse-3-for-menu.
(flyspell-mode-on): Replace flyspell-use-mouse-3-for-menu
with context-menu-mode.
(make-flyspell-overlay): When context-menu-mode is non-nil,
put overlay context-menu-function with flyspell-context-menu
instead of using keymap flyspell-mouse-map.
Fix backtrace when query-about-changed-file nil and file has changed
* lisp/userlock.el (userlock--check-content-unchanged): Make the
assertion more robust -- we may be called here from a different
contexts if `query-about-changed-file' is nil.
Enable setting timeclock-workday after switching mode on
* lisp/calendar/timeclock.el (timeclock--previous-workday): New
variable.
(timeclock-find-discrep): Use it to flush values when
timeclock-workday changes (bug#50216).
(timeclock-mode-line-display): Mention `timeclock-workday' setting
in doc string.
* lisp/progmodes/compile.el (compilation-find-file): Avoid
`expand-file-name' when computing the file names, because that will
reliably give the wrong result when there's symlinks and ".."
involved (bug#8035).
Michael Albinus [Thu, 26 Aug 2021 11:14:19 +0000 (13:14 +0200)]
Improve robustness of shadowfile.el
* lisp/shadowfile.el (shadow-site-help): New defconst.
(shadow-read-site): Use it.
(shadow-make-fullname, shadow-contract-file-name)
(shadow-define-literal-group): Handle errors more robust. (Bug#49596)
Tassilo Horn [Thu, 26 Aug 2021 10:51:08 +0000 (12:51 +0200)]
Fix docs about the meaning of the Re: in the subject
* doc/misc/message.texi (Message Headers): Clarify that it comes from
the Latin "res" meaning "in the matter of" rather than "in response
to" as claimed previously (see RFC-2822).
Augusto Stoffel [Wed, 25 Aug 2021 10:29:22 +0000 (12:29 +0200)]
Add support for OSC escape codes in comint
* doc/emacs/misc.texi (Shell Mode): Document it.
* lisp/comint.el (comint-osc-handlers, comint-osc--marker): New
variables.
(comint-osc-process-output): New function.
(comint-osc-hyperlink-map): New map.
(comint-osc-hyperlink-handler): New function.
Fix up previous conf-mode/tex-mode redirection hacks
* lisp/textmodes/conf-mode.el (conf-mode):
* lisp/textmodes/tex-mode.el (tex--redirect-to-submode): The
previous hack to these redirections would disable all local
variables. Try to work around this a bit more.
Eli Zaretskii [Mon, 23 Aug 2021 20:14:00 +0000 (23:14 +0300)]
Document 'jit-lock-bounds'
* doc/lispref/modes.texi (Other Font Lock Variables):
* lisp/jit-lock.el (jit-lock-functions, jit-lock-register):
Document the return value of the fontification functions.
Add example of advanced user-defined Rx form to manual
* doc/lispref/searching.texi (Extending Rx): Add example illustrating
how to define a user-defined Rx form that performs computation,
from a discussion with Michael Herdeegen (bug#50136).
* lisp/emacs-lisp/rx.el (rx): Clarify evaluation time for `eval`.
Harald Jörg [Mon, 23 Aug 2021 14:26:45 +0000 (16:26 +0200)]
; cperl-mode: bugfix / rework fontification of here-docs
* lisp/progmodes/cperl-mode.el (cperl-mode): Use
`cperl-font-lock-syntactic-face-function'.
(cperl-commentify): Add a docstring, eliminate unused formal
parameter `noface'.
(cperl-is-here-doc-p): New function to detect whether "<<" starts
a here-document, factored out from `cperl-find-pods-heres'.
(cperl-here-doc-functions): New variable: List of functions which
allow here-documents as parameters, for use in
`cperl-is-here-doc-p'.
(cperl-process-here-doc): New function, factored out from
`cperl-find-pods-heres'. Fixed to keep correct fontification
after non-interactive (elisp) changes (Bug#14343, Bug#28962).
(cperl-find-pods-heres): Extend the doc-string to describe all
parameters. Don't remove text properties in recursive calls on
the same line. Call `cperl-process-here-doc' when appropriate.
(cperl-font-lock-syntactic-face-function): New function to
highlight c-style comments as here-documents (adapted from
perl-mode.el).
* test/lisp/progmodes/cperl-mode-tests.el
(cperl-test-identify-heredoc): New test for the new function
`cperl-is-here-doc-p'.
(cperl-test-identify-no-heredoc): New test for the new function
`cperl-is-here-doc-p', testing constructs which start with "<<"
but are no here-documents.
(cperl-test-here-doc-missing-end): New test to verify correct
detection of a missing here-document delimiter.
(cperl-test-bug-14343): New test to verify that inserting text
into a here-document with elisp does not break fontification.
* doc/lispref/frames.texi (Finding All Frames): Clarify what it
means to "consider".
* src/frame.c (Fnext_frame): Rewrite doc string to say what the
parameters actually mean (bug#13339).
Add new variable 'kill-buffer/delete-auto-save-files'
* doc/emacs/files.texi (Auto Save Files): Document it.
* lisp/cus-start.el (standard): Add customize form.
* lisp/files.el (delete-auto-save-files): Move definition to C
(since it's used in the C layer).
* src/buffer.c (Fkill_buffer): Use the new variable (and remove
the old code that apparently didn't trigger for
kill-buffer/delete-auto-save-files.
(syms_of_buffer): Add new variable
kill-buffer-delete-auto-save-files and move definition of
delete-auto-save-files here (bug#21612).
Juri Linkov [Mon, 23 Aug 2021 07:33:36 +0000 (10:33 +0300)]
* lisp/mouse.el (context-menu-toolbar): New function.
(context-menu-functions): Add context-menu-toolbar to choice.
(context-menu-region): Bind "Paste" to mouse-yank-at-click
instead of mouse-yank-primary.
https://lists.gnu.org/archive/html/emacs-devel/2021-08/msg00735.html
* src/syntax.c (parse-partial-sexp): Also handle markers as
arguments (bug#49944). Tweak error message to follow conventions in
"(elisp) Signaling Errors".
* src/nsmenu.m (update_frame_tool_bar): Get label text and pass it to ...
([EmacsToolbar addDisplayItemWithImage:idx:tag:labelText:helpText:enabled:]):
... this that sets label for NSToolbarItem.
* src/nsterm.h
([EmacsToolbar addDisplayItemWithImage:idx:tag:labelText:helpText:enabled:]):
Add labelText argument.
Michael Albinus [Sun, 22 Aug 2021 12:50:19 +0000 (14:50 +0200)]
Some adaptions for Tramp's security key detection.
* lisp/net/tramp.el (tramp-security-key-timeout-regexp): New defcustom.
(tramp-action-show-and-confirm-message): Don't use timeout, check
for the timeout message of the ssh command.