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.
Eli Zaretskii [Sun, 22 Aug 2021 08:32:26 +0000 (11:32 +0300)]
Improve documentation of 'set-keyboard-coding-system'
* doc/lispref/nonascii.texi (Terminal I/O Encoding):
* doc/emacs/mule.texi (Terminal Coding):
* lisp/international/mule.el (set-keyboard-coding-system):
Document that 'set-keyboard-coding-system' has no effect on modern
MS-Windows systems. (Bug#15289)
Stephen Gildea [Sat, 21 Aug 2021 21:37:54 +0000 (14:37 -0700)]
; MH-E doc: SourceForge repo is no longer current
* doc/misc/mh-e.texi, lisp/mh-e/mh-e.el: Update references to
SourceForge with current URLs and a note that MH-E development
no longer occurs in that repository.
* test/lisp/files-tests.el (files-tests-buffer-offer-save)
(files-tests-save-buffers-kill-emacs--asks-to-save-buffers):
`read-event' is called with arguments.
Clarify cl-defstruct doc string and manual entry somewhat
* doc/misc/cl.texi (Structures): Rename the slot "name" in the
examples to "first-name", since we're talking about the names of
slots a lot here, and having a slot with the name "name" makes the
examples somewhat confusing.
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Clarify certain
things about slots (bug#14278).
Alan Third [Sat, 21 Aug 2021 12:09:37 +0000 (13:09 +0100)]
Fix display bug on macOS (bug#50112)
* src/nsterm.m ([EmacsLayer initWithColorSpace:]): Use the colorspace
setter.
([EmacsLayer setColorSpace:]): Sometimes we seem to get null
colorspaces, so set a default in this case.
([EmacsLayer getContext]): Check whether there's been a surface or
graphics context allocation failure and log it.
The new entry appears next to "Find Definition" and like it only
appears when the context menu was invoked on an identifier.
* lisp/progmodes/prog-mode.el (prog-context-menu): New menu entry.
* lisp/progmodes/xref.el (xref-find-references-at-mouse): New
function, analogous to `xref-find-definitions-at-mouse`.
Indicate progress while searching for references in xref
* lisp/progmodes/xref.el (xref-backend-references): Add messages to
show the user that something is happening instead of silently freezing
during the frequently long synchronous searches for references.
Re-type the :location slot in `xref-match-item` to `xref-location`
* lisp/progmodes/xref.el (xref-match-item): Change type for
:location from `xref-file-location`, which was likely a mistake,
to `xref-location`. This allows `xref-make-match` to take
arguments of any subtype of `xref-location` (bug#50067).
Add xref operations to context menu unconditionally
* lisp/progmodes/prog-mode.el (prog-context-menu):
Add xref operations to the context menu even if xref hasn't been
loaded yet; the functions involved are autoloaded (bug#50067).