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).
Eli Zaretskii [Sat, 21 Aug 2021 08:49:56 +0000 (11:49 +0300)]
Improve documentation of context menus
* doc/lispref/modes.texi (Major Mode Conventions): Add conventions
of setting menu-bar menus and context menus for a major mode.
* doc/emacs/frames.texi (Menu Mouse Clicks): Fix description of
context menu functionality.
Dmitry Gutov [Sat, 21 Aug 2021 02:26:12 +0000 (05:26 +0300)]
Speed up project--read-project-buffer in remote buffers
* lisp/progmodes/project.el (project-buffers): New generic function.
(project--read-project-buffer): Use it here (bug#49264).
(project--buffers-to-kill): And here.
(project-buffers): Specialized implementation for vc-project.
Alan Mackenzie [Fri, 20 Aug 2021 21:12:37 +0000 (21:12 +0000)]
Fix c-tentative-buffer-changes to be nestable in c-save-buffer-state
* lisp/progmodes/cc-defs.el (c-tentative-buffer-changes)
(c-tnt-chng-record-state, c-tnt-chng-cleanup): Enhance such that a
buffer-undo-list of t is handled specially, so that a nil isn't consed onto
it. Thus garbage collection can't later remove the (nil . t) from the end of
the buffer-undo-list, causing an infinite loop.
Allow preserving symlinks with file-precious-flag set
* doc/lispref/files.texi (Saving Buffers): Document it.
* lisp/files.el (file-preserve-symlinks-on-save): New user option
(bug#18125).
(basic-save-buffer-2): Use it.
* lisp/simple.el (execute-extended-command): Move finding the
short command to the timer command, too (bug#50042). This further
ensures that post-command-hook is run faster.
Remove even more waiting from execute-extended-command
* lisp/simple.el (execute-extended-command): Remove all the
waiting from the command and do it all with timers (bug#50042).
This ensures that post-command-hook is run immediately also when
the command has messaged something.