mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
Merge from origin/emacs-29
5fbd12ff49Adapt manual names in emacs-news-modeb36bc69267; * etc/NEWS: Fix typos.f626b9f385; * doc/misc/use-package.texi: Fix indexing.56a6712bd6; * lisp/erc/erc.el (erc-default-target): Fix comment.dcf69a1da4Respect some spaces in auth-source-pass--match-regexpacd462b030; Improve the use-package manual801c1c22de; Prefer HTTPS to HTTP in some URLs74a009dd96Eglot: Handle LSP progress with Emacs progress reporters ...0cfeb1c2bcEglot: cleanup whitespace and indentation465a9e78b9Better test-custom-opts diagnosticsbdbb709978; Fix groff warnings in man pagesd3d9676bf8New script admin/check-man-pagesc2aea9d132; Mention flush-lines in kill-matching-lines docstringf5c3585e4d; Fix typos58a483960d; Improve use-package-autoload-keymap docstring # Conflicts: # etc/NEWS
This commit is contained in:
commit
13310643cd
19 changed files with 722 additions and 345 deletions
56
admin/check-man-pages
Executable file
56
admin/check-man-pages
Executable file
|
|
@ -0,0 +1,56 @@
|
|||
#!/bin/bash
|
||||
### check-man-pages - check man pages for errors
|
||||
|
||||
## Copyright (C) 2022 Free Software Foundation, Inc.
|
||||
|
||||
## Author: Stefan Kangas <stefankangas@gmail.com>
|
||||
|
||||
## This file is part of GNU Emacs.
|
||||
|
||||
## GNU Emacs is free software: you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
## the Free Software Foundation, either version 3 of the License, or
|
||||
## (at your option) any later version.
|
||||
|
||||
## GNU Emacs is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
## GNU General Public License for more details.
|
||||
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
### Commentary:
|
||||
|
||||
## Check Emacs man pages for errors using `man'.
|
||||
|
||||
### Code:
|
||||
|
||||
source "${0%/*}/emacs-shell-lib"
|
||||
|
||||
exit_status=0
|
||||
|
||||
cd "$PD"/../doc/man
|
||||
for page in *.1; do
|
||||
# ctags.1 just includes the man page etags.1, which AFAICT will
|
||||
# default to the one installed on the system (!), instead of the
|
||||
# one in the repository. So checking it is pointless, and we will
|
||||
# in any case already check etags.1 separately.
|
||||
if [ "$page" == "ctags.1" ]; then
|
||||
continue
|
||||
fi
|
||||
log=$(emacs_mktemp)
|
||||
LC_ALL=C.UTF-8 MANROFFSEQ='' MANWIDTH=80 \
|
||||
man --warnings=all,mac -E UTF-8 -l -Tutf8 -Z "$page" >/dev/null 2> "$log"
|
||||
log_size=$(stat --format=%s "$log")
|
||||
if [ "$log_size" -ne 0 ]; then
|
||||
echo "doc/man/$page:"
|
||||
# Point to the correct file for *compilation* buffers.
|
||||
cat "$log" \
|
||||
| sed 's/troff: man1\/\([^ ]\+\)\.1/troff: doc\/man\/\1.1/' \
|
||||
| sed "s/<standard input>/doc\/man\/$page/"
|
||||
exit_status=1
|
||||
fi
|
||||
done
|
||||
|
||||
exit $exit_status
|
||||
|
|
@ -145,7 +145,8 @@ Names should be as they appear in loaddefs.el.")
|
|||
(require 'cus-load)
|
||||
|
||||
(defvar cus-test-errors nil
|
||||
"List of problematic variables found by `cus-test-apropos'.")
|
||||
"List of problematic variables found by `cus-test-apropos'.
|
||||
Each element is (VARIABLE . PROBLEM); see `cus-test--format-problem'.")
|
||||
|
||||
(defvar cus-test-tested-variables nil
|
||||
"List of options tested by last call of `cus-test-apropos'.")
|
||||
|
|
@ -181,6 +182,15 @@ Set by `cus-test-noloads'.")
|
|||
;; (defvar cus-test-vars-cus-loaded nil
|
||||
;; "A list of options loaded by `custom-load-symbol'.")
|
||||
|
||||
(defun cus-test--format-error (err)
|
||||
"Format an element of `cus-test-errors'."
|
||||
(pcase err
|
||||
(`(,var :type-error ,value ,type)
|
||||
(format "variable: %s\n value: %S\n type: %S" var value type))
|
||||
(`(,var :other-error ,e)
|
||||
(format "variable: %s\n error: %S" var e))
|
||||
(_ (format "%S" err))))
|
||||
|
||||
(defun cus-test-apropos (regexp)
|
||||
"Check the options matching REGEXP.
|
||||
The detected problematic options are stored in `cus-test-errors'."
|
||||
|
|
@ -200,8 +210,7 @@ The detected problematic options are stored in `cus-test-errors'."
|
|||
(let* ((type (custom-variable-type symbol))
|
||||
(conv (widget-convert type))
|
||||
(get (or (get symbol 'custom-get) 'default-value))
|
||||
values
|
||||
mismatch)
|
||||
values)
|
||||
(when (default-boundp symbol)
|
||||
(push (funcall get symbol) values)
|
||||
(push (eval (car (get symbol 'standard-value)) t) values))
|
||||
|
|
@ -215,7 +224,9 @@ The detected problematic options are stored in `cus-test-errors'."
|
|||
;; TODO for booleans, check for values that can be
|
||||
;; evaluated and are not t or nil. Usually a bug.
|
||||
(unless (widget-apply conv :match value)
|
||||
(setq mismatch 'mismatch)))
|
||||
(let ((err (list symbol :type-error value type)))
|
||||
(unless (member err cus-test-errors)
|
||||
(push err cus-test-errors)))))
|
||||
values)
|
||||
|
||||
;; Store symbols with a custom-get property.
|
||||
|
|
@ -231,13 +242,12 @@ The detected problematic options are stored in `cus-test-errors'."
|
|||
(and (consp c-value)
|
||||
(boundp symbol)
|
||||
(not (equal (eval (car c-value) t) (symbol-value symbol)))
|
||||
(add-to-list 'cus-test-vars-with-changed-state symbol)))
|
||||
|
||||
(if mismatch
|
||||
(push symbol cus-test-errors)))
|
||||
(add-to-list 'cus-test-vars-with-changed-state symbol))))
|
||||
|
||||
(error
|
||||
(push symbol cus-test-errors)
|
||||
(let ((err (list symbol :other-error alpha)))
|
||||
(unless (member err cus-test-errors)
|
||||
(push err cus-test-errors)))
|
||||
(message "Error for %s: %s" symbol alpha))))
|
||||
(cus-test-get-options regexp))
|
||||
(message "%s options tested"
|
||||
|
|
@ -292,7 +302,7 @@ currently defined groups."
|
|||
(insert "No errors found by cus-test.")
|
||||
(insert "The following variables seem to have problems:\n\n")
|
||||
(dolist (e cus-test-errors)
|
||||
(insert (symbol-name e) "\n")))))
|
||||
(insert (cus-test--format-error e) "\n")))))
|
||||
|
||||
(defun cus-test-load-custom-loads ()
|
||||
"Call `custom-load-symbol' on all atoms."
|
||||
|
|
@ -399,7 +409,7 @@ Returns a list of variables with suspicious types."
|
|||
(message "No problems found")
|
||||
nil)
|
||||
(message "The following options might have problems:")
|
||||
(cus-test-message cus-test-errors)
|
||||
(cus-test-message (mapcar #'cus-test--format-error cus-test-errors))
|
||||
cus-test-errors))
|
||||
|
||||
(defun cus-test-deps ()
|
||||
|
|
|
|||
|
|
@ -150,6 +150,12 @@ General steps (for each step, check for possible errors):
|
|||
4. autoreconf -i -I m4 --force
|
||||
make bootstrap
|
||||
|
||||
./admin/check-man-pages
|
||||
|
||||
The above script checks for any mistakes in the source text of
|
||||
manual pages. Fix any errors and re-run the script to verify.
|
||||
Then do this:
|
||||
|
||||
make -C etc/refcards
|
||||
make -C etc/refcards clean
|
||||
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ otherwise. This is particularly useful when storing many predefined
|
|||
regexps in a file.
|
||||
.br
|
||||
In its second form, \fIregexfile\fP is the name of a file that contains
|
||||
a number of arguments to the \fI\-\-regex\=\fP option,
|
||||
a number of arguments to the \fI\-\-regex=\fP option,
|
||||
one per line. Lines beginning with a space or tab are assumed
|
||||
to be comments, and ignored.
|
||||
|
||||
|
|
@ -220,22 +220,22 @@ from shell interpretation.
|
|||
|
||||
Tag the DEFVAR macros in the emacs source files:
|
||||
.br
|
||||
\fI\-\-regex\='/[ \\t]*DEFVAR_[A-Z_ \\t(]+"\\([^"]+\\)"/'\fP
|
||||
\fI\-\-regex='/[ \\t]*DEFVAR_[A-Z_ \\t(]+"\\([^"]+\\)"/'\fP
|
||||
.\"" This comment is to avoid confusion to Emacs syntax highlighting
|
||||
.br
|
||||
|
||||
Tag VHDL files (this example is a single long line, broken here for
|
||||
formatting reasons):
|
||||
.br
|
||||
\fI\-\-language\=none\ \-\-regex='/[\ \\t]*\\(ARCHITECTURE\\|\\
|
||||
CONFIGURATION\\)\ +[^\ ]*\ +OF/'\ \-\-regex\='/[\ \\t]*\\
|
||||
\fI\-\-language=none\ \-\-regex='/[\ \\t]*\\(ARCHITECTURE\\|\\
|
||||
CONFIGURATION\\)\ +[^\ ]*\ +OF/'\ \-\-regex='/[\ \\t]*\\
|
||||
\\(ATTRIBUTE\\|ENTITY\\|FUNCTION\\|PACKAGE\\(\ BODY\\)?\\
|
||||
\\|PROCEDURE\\|PROCESS\\|TYPE\\)[\ \\t]+\\([^\ \\t(]+\\)/\\3/'\fP
|
||||
.br
|
||||
|
||||
Tag Tcl files (this last example shows the usage of a \fItagregexp\fP):
|
||||
.br
|
||||
\fI\-\-lang\=none \-\-regex\='/proc[\ \\t]+\\([^\ \\t]+\\)/\\1/'\fP
|
||||
\fI\-\-lang=none \-\-regex='/proc[\ \\t]+\\([^\ \\t]+\\)/\\1/'\fP
|
||||
|
||||
.br
|
||||
A regexp can be preceded by {\fIlang\fP}, thus restricting it to match
|
||||
|
|
|
|||
|
|
@ -955,6 +955,13 @@ Note that you can still configure the excluded Emacs features manually
|
|||
to use Eglot in your @code{eglot-managed-mode-hook} or via some other
|
||||
mechanism.
|
||||
|
||||
@vindex eglot-report-progress
|
||||
@cindex progress
|
||||
@item eglot-report-progress
|
||||
Set this variable to true if you'd like progress notifications coming
|
||||
from the LSP server to be handled as Emacs's progress reporting
|
||||
facilities.
|
||||
|
||||
@vindex eglot-workspace-configuration
|
||||
@cindex server workspace configuration
|
||||
@item eglot-workspace-configuration
|
||||
|
|
|
|||
|
|
@ -847,7 +847,7 @@ Binding,,, elisp, The Emacs Lisp Reference Manual}) to be active.
|
|||
@findex flymake-proc-legacy-flymake
|
||||
The backend @code{flymake-proc-legacy-flymake} was originally designed
|
||||
to be extended for supporting new syntax check tools and error message
|
||||
patterns. It is also controlled by its own set of customization variables
|
||||
patterns. It is also controlled by its own set of customization variables.
|
||||
|
||||
@node Proc customization variables
|
||||
@section Customization variables for the Proc backend
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
18
etc/NEWS.29
18
etc/NEWS.29
|
|
@ -2002,14 +2002,14 @@ After Emacs 29.1, some aspects of EUDC will be deprecated. The goal
|
|||
of these deprecations is to simplify EUDC server configuration by
|
||||
making 'eudc-server-hotlist' the only place to add servers. There
|
||||
will not be a need to set the server using the 'eudc-set-server'
|
||||
function. Instead, the 'eudc-server-hotlist' variable should be
|
||||
command. Instead, the 'eudc-server-hotlist' user option should be
|
||||
customized to have an entry for the server. The plan is to obsolete
|
||||
the 'eudc-hotlist' editor since Customize is sufficient for changing
|
||||
'eudc-server-hotlist'. How the 'eudc-server' variable works in this
|
||||
the 'eudc-hotlist' package since Customize is sufficient for changing
|
||||
'eudc-server-hotlist'. How the 'eudc-server' user option works in this
|
||||
context is to-be-determined; it can't be removed, because that would
|
||||
break compatibility, but it may become synchronized with
|
||||
'eudc-server-hotlist' so that 'eudc-server' is always equal to (first
|
||||
eudc-server-hotlist). The first entry in 'eudc-server-hotlist' is the
|
||||
'eudc-server-hotlist' so that 'eudc-server' is always equal to '(car
|
||||
eudc-server-hotlist)'. The first entry in 'eudc-server-hotlist' is the
|
||||
first server tried by 'eudc-expand-try-all'. The hotlist
|
||||
simplification will allow 'eudc-query-form' to show a drop down of
|
||||
possible servers, instead of requiring a call to 'eudc-set-server'
|
||||
|
|
@ -2967,7 +2967,7 @@ Protocol (LSP).
|
|||
use-package is shipped with Emacs. It provides the 'use-package'
|
||||
macro, which allows you to isolate package configuration in your init
|
||||
file in a way that is declarative, tidy, and performance-oriented.
|
||||
See the new Info manual 'use-package' for more.
|
||||
See the new Info manual "(use-package) Top" for more.
|
||||
|
||||
+++
|
||||
** New commands 'image-crop' and 'image-cut'.
|
||||
|
|
@ -3017,13 +3017,13 @@ when visiting JSON files.
|
|||
A major mode based on the tree-sitter library for editing programs
|
||||
in the TypeScript language. It includes support for font-locking,
|
||||
indentation, and navigation. This mode will be auto-enabled for
|
||||
files with the '.ts' extension.
|
||||
files with the ".ts" extension.
|
||||
|
||||
** New major mode 'tsx-ts-mode'.
|
||||
A major mode based on the tree-sitter library for editing programs
|
||||
in the TypeScript language, with support for TSX. It includes
|
||||
support for font-locking, indentation, and navigation. This mode
|
||||
will be auto-enabled for files with the '.tsx' extension.
|
||||
will be auto-enabled for files with the ".tsx" extension.
|
||||
|
||||
** New major mode 'c-ts-mode'.
|
||||
A major mode based on the tree-sitter library for editing programs
|
||||
|
|
@ -4418,7 +4418,7 @@ variable for compatibility but its limiting powers have been taken away.
|
|||
This function returns a completion table designed to ease
|
||||
communication between Emacs's completion facilities and external tools
|
||||
offering completion services, particularly tools whose full working
|
||||
set is too big to transfer to Emacs's every time a completion is
|
||||
set is too big to transfer to Emacs every time a completion is
|
||||
needed. The table uses new 'external' completion style exclusively
|
||||
and cannot work with regular styles such as 'basic' or 'flex'.
|
||||
|
||||
|
|
|
|||
|
|
@ -5994,18 +5994,17 @@ See also `erc-downcase'."
|
|||
(and (erc--target-channel-p erc--target)
|
||||
(erc-get-channel-user (erc-current-nick)) t))
|
||||
|
||||
;; This function happens to return nil in channel buffers previously
|
||||
;; parted or those from which a user had been kicked. While this
|
||||
;; "works" for detecting whether a channel is currently subscribed to,
|
||||
;; new code should consider using
|
||||
;; While `erc-default-target' happens to return nil in channel buffers
|
||||
;; you've parted or from which you've been kicked, using it to detect
|
||||
;; whether a channel is currently joined may become unreliable in the
|
||||
;; future. For now, new code should consider using
|
||||
;;
|
||||
;; (erc-get-channel-user (erc-current-nick))
|
||||
;;
|
||||
;; instead. For retrieving a target regardless of subscription or
|
||||
;; connection status, use replacements based on `erc--target'.
|
||||
;; (Coming soon.)
|
||||
;;
|
||||
;; TODO deprecate this
|
||||
;; and expect a nicer option eventually. For retrieving a target
|
||||
;; regardless of subscription or connection status, use replacements
|
||||
;; based on `erc--target' instead. See also `erc--default-target'.
|
||||
|
||||
(defun erc-default-target ()
|
||||
"Return the current default target (as a character string) or nil if none."
|
||||
(let ((tgt (car erc-default-recipients)))
|
||||
|
|
|
|||
|
|
@ -690,7 +690,7 @@ It has been changed in GVFS 1.14.")
|
|||
("gvfs-set-attribute" . "set"))
|
||||
"List of cons cells, mapping \"gvfs-<command>\" to \"gio <command>\".")
|
||||
|
||||
;; <http://www.pygtk.org/docs/pygobject/gio-constants.html>
|
||||
;; <https://www.pygtk.org/docs/pygobject/gio-constants.html>
|
||||
(eval-and-compile
|
||||
(defconst tramp-gvfs-file-attributes
|
||||
'("name"
|
||||
|
|
|
|||
|
|
@ -505,7 +505,7 @@ compilation and evaluation time conflicts."
|
|||
|
||||
(defun csharp--compilation-error-file-resolve ()
|
||||
"Resolve an msbuild error to a (filename . dirname) cons cell."
|
||||
;; http://stackoverflow.com/a/18049590/429091
|
||||
;; https://stackoverflow.com/a/18049590/429091
|
||||
(cons (match-string 1) (file-name-directory (match-string 4))))
|
||||
|
||||
(defconst csharp-compilation-re-msbuild-error
|
||||
|
|
|
|||
|
|
@ -387,6 +387,11 @@ done by `eglot-reconnect'."
|
|||
"String displayed in mode line when Eglot is active."
|
||||
:type 'string)
|
||||
|
||||
(defcustom eglot-report-progress t
|
||||
"If non-nil, show progress of long running LSP server work"
|
||||
:type 'boolean
|
||||
:version "29.1")
|
||||
|
||||
(defvar eglot-withhold-process-id nil
|
||||
"If non-nil, Eglot will not send the Emacs process id to the language server.
|
||||
This can be useful when using docker to run a language server.")
|
||||
|
|
@ -471,6 +476,7 @@ This can be useful when using docker to run a language server.")
|
|||
(TextDocumentEdit (:textDocument :edits) ())
|
||||
(TextEdit (:range :newText))
|
||||
(VersionedTextDocumentIdentifier (:uri :version) ())
|
||||
(WorkDoneProgress (:kind) (:title :message :percentage :cancellable))
|
||||
(WorkspaceEdit () (:changes :documentChanges))
|
||||
(WorkspaceSymbol (:name :kind) (:containerName :location :data)))
|
||||
"Alist (INTERFACE-NAME . INTERFACE) of known external LSP interfaces.
|
||||
|
|
@ -541,7 +547,7 @@ on unknown notifications and errors on unknown requests."))
|
|||
for type = (or (cdr (assoc k types)) t) ;; FIXME: enforce nil type?
|
||||
unless (cl-typep v type)
|
||||
do (eglot--error "A `%s' must have a %s as %s, but has %s"
|
||||
interface-name )))
|
||||
interface-name)))
|
||||
t))
|
||||
|
||||
(eval-and-compile
|
||||
|
|
@ -832,6 +838,9 @@ treated as in `eglot--dbind'."
|
|||
(project
|
||||
:documentation "Project associated with server."
|
||||
:accessor eglot--project)
|
||||
(progress-reporters
|
||||
:initform (make-hash-table :test #'equal) :accessor eglot--progress-reporters
|
||||
:documentation "Maps LSP progress tokens to progress reporters.")
|
||||
(inhibit-autoreconnect
|
||||
:initform t
|
||||
:documentation "Generalized boolean inhibiting auto-reconnection if true."
|
||||
|
|
@ -1126,11 +1135,11 @@ INTERACTIVE is t if called interactively."
|
|||
(let ((buffer (current-buffer)))
|
||||
(cl-labels
|
||||
((maybe-connect
|
||||
()
|
||||
(remove-hook 'post-command-hook #'maybe-connect nil)
|
||||
(eglot--when-live-buffer buffer
|
||||
(unless eglot--managed-mode
|
||||
(apply #'eglot--connect (eglot--guess-contact))))))
|
||||
()
|
||||
(remove-hook 'post-command-hook #'maybe-connect nil)
|
||||
(eglot--when-live-buffer buffer
|
||||
(unless eglot--managed-mode
|
||||
(apply #'eglot--connect (eglot--guess-contact))))))
|
||||
(when buffer-file-name
|
||||
(add-hook 'post-command-hook #'maybe-connect 'append nil)))))
|
||||
|
||||
|
|
@ -1182,7 +1191,7 @@ Each function is passed the server as an argument")
|
|||
(list "sh" "-c"
|
||||
(string-join (cons "stty raw > /dev/null;"
|
||||
(mapcar #'shell-quote-argument contact))
|
||||
" "))
|
||||
" "))
|
||||
contact))
|
||||
|
||||
(defvar-local eglot--cached-server nil
|
||||
|
|
@ -1236,7 +1245,7 @@ This docstring appeases checkdoc, that's all."
|
|||
,@more-initargs)))))
|
||||
(spread (lambda (fn) (lambda (server method params)
|
||||
(let ((eglot--cached-server server))
|
||||
(apply fn server method (append params nil))))))
|
||||
(apply fn server method (append params nil))))))
|
||||
(server
|
||||
(apply
|
||||
#'make-instance class
|
||||
|
|
@ -1570,7 +1579,7 @@ Doubles as an indicator of snippet support."
|
|||
(setq-local markdown-fontify-code-blocks-natively t)
|
||||
(insert string)
|
||||
(let ((inhibit-message t)
|
||||
(message-log-max nil))
|
||||
(message-log-max nil))
|
||||
(ignore-errors (delay-mode-hooks (funcall mode))))
|
||||
(font-lock-ensure)
|
||||
(string-trim (buffer-string)))))
|
||||
|
|
@ -1855,8 +1864,8 @@ If it is activated, also signal textDocument/didOpen."
|
|||
(force-mode-line-update t))))))
|
||||
|
||||
(defun eglot-manual () "Open documentation."
|
||||
(declare (obsolete info "29.1"))
|
||||
(interactive) (info "(eglot)"))
|
||||
(declare (obsolete info "29.1"))
|
||||
(interactive) (info "(eglot)"))
|
||||
|
||||
(easy-menu-define eglot-menu nil "Eglot"
|
||||
`("Eglot"
|
||||
|
|
@ -1960,17 +1969,17 @@ Uses THING, FACE, DEFS and PREPEND."
|
|||
'keymap (let ((map (make-sparse-keymap)))
|
||||
(define-key map [mode-line down-mouse-1] eglot-server-menu)
|
||||
map))
|
||||
,@(when last-error
|
||||
,@(when last-error
|
||||
`("/" ,(eglot--mode-line-props
|
||||
"error" 'compilation-mode-line-fail
|
||||
'((mouse-3 eglot-clear-status "Clear this status"))
|
||||
(format "An error occurred: %s\n" (plist-get last-error
|
||||
:message)))))
|
||||
,@(when (cl-plusp pending)
|
||||
`("/" ,(eglot--mode-line-props
|
||||
(format "%d" pending) 'warning
|
||||
'((mouse-3 eglot-forget-pending-continuations
|
||||
"Forget pending continuations"))
|
||||
:message)))))
|
||||
,@(when (cl-plusp pending)
|
||||
`("/" ,(eglot--mode-line-props
|
||||
(format "%d" pending) 'warning
|
||||
'((mouse-3 eglot-forget-pending-continuations
|
||||
"Forget pending continuations"))
|
||||
"Number of outgoing, \
|
||||
still unanswered LSP requests to the server\n"))))))))
|
||||
|
||||
|
|
@ -1988,13 +1997,13 @@ still unanswered LSP requests to the server\n"))))))))
|
|||
(defalias 'eglot--diag-data 'flymake-diagnostic-data)
|
||||
|
||||
(cl-loop for i from 1
|
||||
for type in '(eglot-note eglot-warning eglot-error )
|
||||
for type in '(eglot-note eglot-warning eglot-error)
|
||||
do (put type 'flymake-overlay-control
|
||||
`((mouse-face . highlight)
|
||||
(priority . ,(+ 50 i))
|
||||
(keymap . ,(let ((map (make-sparse-keymap)))
|
||||
(define-key map [mouse-1]
|
||||
(eglot--mouse-call 'eglot-code-actions))
|
||||
(eglot--mouse-call 'eglot-code-actions))
|
||||
map)))))
|
||||
|
||||
|
||||
|
|
@ -2050,6 +2059,27 @@ COMMAND is a symbol naming the command."
|
|||
(_server (_method (eql telemetry/event)) &rest _any)
|
||||
"Handle notification telemetry/event.") ;; noop, use events buffer
|
||||
|
||||
(cl-defmethod eglot-handle-notification
|
||||
(server (_method (eql $/progress)) &key token value)
|
||||
"Handle $/progress notification identified by TOKEN from SERVER."
|
||||
(when eglot-report-progress
|
||||
(cl-flet ((fmt (&rest args) (mapconcat #'identity args " ")))
|
||||
(eglot--dbind ((WorkDoneProgress) kind title percentage message) value
|
||||
(pcase kind
|
||||
("begin"
|
||||
(let* ((prefix (format (concat "[eglot] %s %s:" (when percentage " "))
|
||||
(eglot-project-nickname server) token))
|
||||
(pr (puthash token
|
||||
(if percentage
|
||||
(make-progress-reporter prefix 0 100 percentage 1 0)
|
||||
(make-progress-reporter prefix nil nil nil 1 0))
|
||||
(eglot--progress-reporters server))))
|
||||
(progress-reporter-update pr percentage (fmt title message))))
|
||||
("report"
|
||||
(when-let ((pr (gethash token (eglot--progress-reporters server))))
|
||||
(progress-reporter-update pr percentage (fmt title message))))
|
||||
("end" (remhash token (eglot--progress-reporters server))))))))
|
||||
|
||||
(cl-defmethod eglot-handle-notification
|
||||
(_server (_method (eql textDocument/publishDiagnostics)) &key uri diagnostics
|
||||
&allow-other-keys) ; FIXME: doesn't respect `eglot-strict-mode'
|
||||
|
|
@ -2174,7 +2204,7 @@ THINGS are either registrations or unregisterations (sic)."
|
|||
(append
|
||||
(eglot--VersionedTextDocumentIdentifier)
|
||||
(list :languageId
|
||||
(eglot--language-id (eglot--current-server-or-lose))
|
||||
(eglot--language-id (eglot--current-server-or-lose))
|
||||
:text
|
||||
(eglot--widening
|
||||
(buffer-substring-no-properties (point-min) (point-max))))))
|
||||
|
|
@ -2636,7 +2666,7 @@ If BUFFER, switch to it before."
|
|||
uri range))))))
|
||||
(if (vectorp response) response (and response (list response)))))))
|
||||
|
||||
(cl-defun eglot--lsp-xref-helper (method &key extra-params capability )
|
||||
(cl-defun eglot--lsp-xref-helper (method &key extra-params capability)
|
||||
"Helper for `eglot-find-declaration' & friends."
|
||||
(let ((eglot--lsp-xref-refs (eglot--lsp-xrefs-for-method
|
||||
method
|
||||
|
|
@ -2668,7 +2698,7 @@ If BUFFER, switch to it before."
|
|||
(get-text-property 0 'eglot--lsp-workspaceSymbol probe)
|
||||
(eglot--dbind ((Location) uri range) location
|
||||
(list (eglot--xref-make-match name uri range))))
|
||||
(eglot--lsp-xrefs-for-method :textDocument/definition))))
|
||||
(eglot--lsp-xrefs-for-method :textDocument/definition))))
|
||||
|
||||
(cl-defmethod xref-backend-references ((_backend (eql eglot)) _identifier)
|
||||
(or
|
||||
|
|
@ -2707,7 +2737,7 @@ for which LSP on-type-formatting should be requested."
|
|||
`(:textDocument/onTypeFormatting
|
||||
:documentOnTypeFormattingProvider
|
||||
,`(:position ,(eglot--pos-to-lsp-position beg)
|
||||
:ch ,(string on-type-format))))
|
||||
:ch ,(string on-type-format))))
|
||||
((and beg end)
|
||||
`(:textDocument/rangeFormatting
|
||||
:documentRangeFormattingProvider
|
||||
|
|
@ -3280,24 +3310,24 @@ at point. With prefix argument, prompt for ACTION-KIND."
|
|||
(eglot--project server))))))
|
||||
(cl-labels
|
||||
((handle-event
|
||||
(event)
|
||||
(pcase-let* ((`(,desc ,action ,file ,file1) event)
|
||||
(action-type (cl-case action
|
||||
(created 1) (changed 2) (deleted 3)))
|
||||
(action-bit (when action-type
|
||||
(ash 1 (1- action-type)))))
|
||||
(cond
|
||||
((and (memq action '(created changed deleted))
|
||||
(cl-loop for (glob . kind-bitmask) in globs
|
||||
thereis (and (> (logand kind-bitmask action-bit) 0)
|
||||
(funcall glob file))))
|
||||
(jsonrpc-notify
|
||||
server :workspace/didChangeWatchedFiles
|
||||
`(:changes ,(vector `(:uri ,(eglot--path-to-uri file)
|
||||
:type ,action-type)))))
|
||||
((eq action 'renamed)
|
||||
(handle-event `(,desc 'deleted ,file))
|
||||
(handle-event `(,desc 'created ,file1)))))))
|
||||
(event)
|
||||
(pcase-let* ((`(,desc ,action ,file ,file1) event)
|
||||
(action-type (cl-case action
|
||||
(created 1) (changed 2) (deleted 3)))
|
||||
(action-bit (when action-type
|
||||
(ash 1 (1- action-type)))))
|
||||
(cond
|
||||
((and (memq action '(created changed deleted))
|
||||
(cl-loop for (glob . kind-bitmask) in globs
|
||||
thereis (and (> (logand kind-bitmask action-bit) 0)
|
||||
(funcall glob file))))
|
||||
(jsonrpc-notify
|
||||
server :workspace/didChangeWatchedFiles
|
||||
`(:changes ,(vector `(:uri ,(eglot--path-to-uri file)
|
||||
:type ,action-type)))))
|
||||
((eq action 'renamed)
|
||||
(handle-event `(,desc 'deleted ,file))
|
||||
(handle-event `(,desc 'created ,file1)))))))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(dolist (dir dirs-to-watch)
|
||||
|
|
|
|||
|
|
@ -54,9 +54,8 @@
|
|||
;; (question mark) if no backends were even configured.
|
||||
;;
|
||||
;; For programmers interested in writing a new Flymake backend, the
|
||||
;; docstring of `flymake-diagnostic-functions', the Flymake manual,
|
||||
;; and the code of existing backends are probably a good starting
|
||||
;; point.
|
||||
;; docstring of `flymake-diagnostic-functions', the Flymake manual, and the
|
||||
;; code of existing backends are probably good starting points.
|
||||
;;
|
||||
;; The user wishing to customize the appearance of error types should
|
||||
;; set properties on the symbols associated with each diagnostic type.
|
||||
|
|
|
|||
|
|
@ -1101,7 +1101,10 @@ Hence, a match starting on the same line at which another match
|
|||
ended is ignored.
|
||||
|
||||
Return the number of killed matching lines. When called
|
||||
interactively, also print the number."
|
||||
interactively, also print the number.
|
||||
|
||||
If you merely want to delete the lines, without adding them to
|
||||
the kill ring, the \\[flush-lines] command is faster."
|
||||
(interactive
|
||||
(progn
|
||||
(barf-if-buffer-read-only)
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ untagged NEWS entry."
|
|||
;; Do manual references.
|
||||
(goto-char (point-min))
|
||||
(search-forward "\f" nil t)
|
||||
(while (re-search-forward "\"\\(([a-z0-9]+)[ \n][^\"]\\{1,80\\}\\)\""
|
||||
(while (re-search-forward "\"\\(([a-z0-9-]+)[ \n][^\"]\\{1,80\\}\\)\""
|
||||
nil t)
|
||||
(buttonize-region (match-beginning 1) (match-end 1)
|
||||
(lambda (node) (info node))
|
||||
|
|
|
|||
|
|
@ -282,7 +282,7 @@ Accepts keyword arguments:
|
|||
key in the repeat map, but will not set the
|
||||
`repeat-map' property of the bound command.
|
||||
:continue BINDINGS - Within the scope of `:repeat-map' forces the
|
||||
same behaviour as if no special keyword had
|
||||
same behavior as if no special keyword had
|
||||
been used (that is, the command is bound, and
|
||||
it's `repeat-map' property set)
|
||||
:filter FORM - optional form to determine when bindings apply
|
||||
|
|
@ -429,7 +429,7 @@ Accepts keyword arguments:
|
|||
key in the repeat map, but will not set the
|
||||
`repeat-map' property of the bound command.
|
||||
:continue BINDINGS - Within the scope of `:repeat-map' forces the
|
||||
same behaviour as if no special keyword had
|
||||
same behavior as if no special keyword had
|
||||
been used (that is, the command is bound, and
|
||||
it's `repeat-map' property set)
|
||||
:filter FORM - optional form to determine when bindings apply
|
||||
|
|
|
|||
|
|
@ -38,15 +38,14 @@
|
|||
|
||||
;;;###autoload
|
||||
(defun use-package-autoload-keymap (keymap-symbol package override)
|
||||
"Loads PACKAGE and then binds the key sequence used to invoke
|
||||
this function to KEYMAP-SYMBOL. It then simulates pressing the
|
||||
same key sequence a again, so that the next key pressed is routed
|
||||
to the newly loaded keymap.
|
||||
"Load PACKAGE and bind key sequence invoking this function to KEYMAP-SYMBOL.
|
||||
Then simulate pressing the same key sequence a again, so that the
|
||||
next key pressed is routed to the newly loaded keymap.
|
||||
|
||||
This function supports use-package's :bind-keymap keyword. It
|
||||
This function supports use-package's :bind-keymap keyword. It
|
||||
works by binding the given key sequence to an invocation of this
|
||||
function for a particular keymap. The keymap is expected to be
|
||||
defined by the package. In this way, loading the package is
|
||||
function for a particular keymap. The keymap is expected to be
|
||||
defined by the package. In this way, loading the package is
|
||||
deferred until the prefix key sequence is pressed."
|
||||
(if (not (require package nil t))
|
||||
(use-package-error (format "Cannot load package.el: %s" package))
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <config.h>
|
||||
#include <math.h>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef ITREE_H
|
||||
#define ITREE_H
|
||||
|
|
|
|||
Loading…
Reference in a new issue