Merge from origin/emacs-29
3bdbb66efb
; CONTRIBUTE: Minor stylistic changes.d0eb12e8d3
Fix typo in section 14.1 of Emacs Manualb2fbec37f3
; * etc/EGLOT-NEWS: Clarify scope of topmost section131ec049db
Eglot: unbreak eglot-extend-to-xref on w320622e1f29f
Eglot: ensure server shutdown turns off eglot-inlay-hints...59f66ea302
; * lisp/emacs-lisp/package-vc.el: Remove completed item ...d23dc3dd7e
; * lisp/emacs-lisp/package-vc.el (package-vc): Fix manua...4508a024e8
; Clarify documentation of 'cursor' text propertyd2e82817a3
Add two typescript-ts-mode faces (bug#62429)10918fc9d2
Fix scrolling window when point moves up9b32bc134c
Improve documentation of 'defcustom's :set keywordab4273056e
Comp fix calls to redefined primtives with op-bytecode (b...c98929c7e1
; Fix last changea14c3f62a6
; Fix last change09fece5722
Fix duplicate defcustom in eww.ele45bd10a3d
Fix indentation regression in 'C-h l'46fd10a760
* doc/misc/tramp.texi (Remote shell setup): Clarify use o...
This commit is contained in:
commit
c108132d3b
16 changed files with 126 additions and 62 deletions
10
CONTRIBUTE
10
CONTRIBUTE
|
@ -110,7 +110,7 @@ admin/notes/bug-triage.
|
|||
|
||||
Any change that matters to end-users should have an entry in etc/NEWS.
|
||||
Try to start each NEWS entry with a sentence that summarizes the entry
|
||||
and takes just one line -- this will allow to read NEWS in Outline
|
||||
and takes just one line -- this will allow reading NEWS in Outline
|
||||
mode after hiding the body of each entry.
|
||||
|
||||
Doc-strings should be updated together with the code.
|
||||
|
@ -123,7 +123,7 @@ Think about whether your change requires updating the manuals. If you
|
|||
know it does not, mark the NEWS entry with "---". If you know
|
||||
that *all* the necessary documentation updates have been made as part
|
||||
of your changes or those by others, mark the entry with "+++".
|
||||
Otherwise do not mark it.
|
||||
Otherwise, do not mark it.
|
||||
|
||||
If your change requires updating the manuals to document new
|
||||
functions/commands/variables/faces, then use the proper Texinfo
|
||||
|
@ -400,7 +400,7 @@ the commit to master, by starting the commit message with "Backport:".
|
|||
The gitmerge function excludes these commits from the merge to the master.
|
||||
|
||||
Some changes should not be merged to master at all, for whatever
|
||||
reasons. These should be marked by including something like "Do not
|
||||
reason. These should be marked by including something like "Do not
|
||||
merge to master" or anything that matches gitmerge-skip-regexp (see
|
||||
admin/gitmerge.el) in the commit message.
|
||||
|
||||
|
@ -449,8 +449,8 @@ files intended for use only with Emacs version 24.5 and later.
|
|||
|
||||
*** Useful files in the admin/ directory
|
||||
|
||||
See all the files in admin/notes/* . In particular, see
|
||||
admin/notes/newfile, see admin/notes/repo.
|
||||
See all the files in 'admin/notes/*'. In particular, see
|
||||
'admin/notes/newfile' and 'admin/notes/repo'.
|
||||
|
||||
The file admin/MAINTAINERS records the areas of interest of frequent
|
||||
Emacs contributors. If you are making changes in one of the files
|
||||
|
|
|
@ -154,7 +154,7 @@ the buffer will be momentarily unfontified.
|
|||
@vindex redisplay-skip-fontification-on-input
|
||||
Finally, a third alternative to these variables is
|
||||
@code{redisplay-skip-fontification-on-input}. If this variable is
|
||||
non-@code{nil}, skip some fontifications is there's input pending.
|
||||
non-@code{nil}, skip some fontifications if there's input pending.
|
||||
This usually does not affect the display because redisplay is
|
||||
completely skipped anyway if input was pending, but it can make
|
||||
scrolling smoother by avoiding unnecessary fontification.
|
||||
|
|
|
@ -378,8 +378,15 @@ the option as a Lisp variable); preferably, though, it should not
|
|||
modify its value argument destructively. The default for
|
||||
@var{setfunction} is @code{set-default-toplevel-value}.
|
||||
|
||||
If defined, @var{setfunction} will also be called when evaluating a
|
||||
@code{defcustom} form with @kbd{C-M-x} in Emacs Lisp mode and when the
|
||||
@var{option}'s value is changed via the @code{setopt} macro
|
||||
(@pxref{Setting Variables, setopt}).
|
||||
|
||||
If you specify this keyword, the variable's documentation string
|
||||
should describe how to do the same job in hand-written Lisp code.
|
||||
should describe how to do the same job in hand-written Lisp code,
|
||||
either by invoking @var{setfunction} directly or by using
|
||||
@code{setopt}.
|
||||
|
||||
@item :get @var{getfunction}
|
||||
@kindex get@r{, @code{defcustom} keyword}
|
||||
|
|
|
@ -3765,18 +3765,19 @@ Consecutive characters with the same @code{field} property constitute a
|
|||
@item cursor
|
||||
@kindex cursor @r{(text property)}
|
||||
Normally, the cursor is displayed at the beginning or the end of any
|
||||
overlay and text property strings present at the current buffer
|
||||
position. You can instead tell Emacs to place the cursor on any
|
||||
desired character of these strings by giving that character a
|
||||
non-@code{nil} @code{cursor} text property. In addition, if the value
|
||||
of the @code{cursor} property is an integer, it specifies the number
|
||||
of buffer's character positions, starting with the position where the
|
||||
overlay or the @code{display} property begins, for which the cursor
|
||||
should be displayed on that character. Specifically, if the value of
|
||||
the @code{cursor} property of a character is the number @var{n}, the
|
||||
cursor will be displayed on this character for any buffer position in
|
||||
the range @code{[@var{ovpos}..@var{ovpos}+@var{n})}, where @var{ovpos}
|
||||
is the overlay's starting position given by @code{overlay-start}
|
||||
overlay and text property strings that ``hide'' (i.e., are displayed
|
||||
instead of) the current buffer position. You can instead tell Emacs
|
||||
to place the cursor on any desired character of these strings by
|
||||
giving that character a non-@code{nil} @code{cursor} text property.
|
||||
In addition, if the value of the @code{cursor} property is an integer,
|
||||
it specifies the number of buffer's character positions, starting with
|
||||
the position where the overlay or the @code{display} property begins,
|
||||
for which the cursor should be displayed on that character.
|
||||
Specifically, if the value of the @code{cursor} property of a
|
||||
character is the number @var{n}, the cursor will be displayed on this
|
||||
character for any buffer position in the range
|
||||
@code{[@var{ovpos}..@var{ovpos}+@var{n})}, where @var{ovpos} is the
|
||||
overlay's starting position given by @code{overlay-start}
|
||||
(@pxref{Managing Overlays}), or the position where the @code{display}
|
||||
text property begins in the buffer.
|
||||
|
||||
|
|
|
@ -2383,10 +2383,11 @@ This uses also the settings in @code{tramp-sh-extra-args}.
|
|||
@vindex RemoteCommand@r{, ssh option}
|
||||
@strong{Note}: If you use an @option{ssh}-based method for connection,
|
||||
do @emph{not} set the @option{RemoteCommand} option in your
|
||||
@command{ssh} configuration, for example to @command{screen}. On the
|
||||
other hand, some @option{ssh}-based methods, like @option{sshx} or
|
||||
@option{scpx}, silently overwrite a @option{RemoteCommand} option of
|
||||
the configuration file.
|
||||
@command{ssh} configuration to something like @command{screen}. If
|
||||
used, @option{RemoteCommand} must open an interactive shell on the
|
||||
remote host. On the other hand, some @option{ssh}-based methods, like
|
||||
@option{sshx} or @option{scpx}, silently overwrite a
|
||||
@option{RemoteCommand} option of the configuration file.
|
||||
|
||||
|
||||
@subsection Other remote shell setup hints
|
||||
|
|
|
@ -280,7 +280,9 @@ The following keywords are meaningful:
|
|||
when using the Customize user interface. It takes two arguments,
|
||||
the symbol to set and the value to give it. The function should
|
||||
not modify its value argument destructively. The default choice
|
||||
of function is `set-default-toplevel-value'.
|
||||
of function is `set-default-toplevel-value'. If this keyword is
|
||||
defined, modifying the value of SYMBOL via `setopt' will call the
|
||||
function specified by VALUE to install the new value.
|
||||
:get VALUE should be a function to extract the value of symbol.
|
||||
The function takes one argument, a symbol, and should return
|
||||
the current value for that symbol. The default choice of function
|
||||
|
|
|
@ -1764,27 +1764,32 @@ Return value is the fall-through block name."
|
|||
(_ (signal 'native-ice
|
||||
'("missing previous setimm while creating a switch")))))
|
||||
|
||||
(defun comp--func-arity (subr-name)
|
||||
"Like `func-arity' but invariant against primitive redefinitions.
|
||||
SUBR-NAME is the name of function."
|
||||
(or (gethash subr-name comp-subr-arities-h)
|
||||
(func-arity subr-name)))
|
||||
|
||||
(defun comp-emit-set-call-subr (subr-name sp-delta)
|
||||
"Emit a call for SUBR-NAME.
|
||||
SP-DELTA is the stack adjustment."
|
||||
(let ((subr (symbol-function subr-name))
|
||||
(nargs (1+ (- sp-delta))))
|
||||
(let* ((arity (func-arity subr))
|
||||
(minarg (car arity))
|
||||
(maxarg (cdr arity)))
|
||||
(when (eq maxarg 'unevalled)
|
||||
(signal 'native-ice (list "subr contains unevalled args" subr-name)))
|
||||
(if (eq maxarg 'many)
|
||||
;; callref case.
|
||||
(comp-emit-set-call (comp-callref subr-name nargs (comp-sp)))
|
||||
;; Normal call.
|
||||
(unless (and (>= maxarg nargs) (<= minarg nargs))
|
||||
(signal 'native-ice
|
||||
(list "incoherent stack adjustment" nargs maxarg minarg)))
|
||||
(let* ((subr-name subr-name)
|
||||
(slots (cl-loop for i from 0 below maxarg
|
||||
collect (comp-slot-n (+ i (comp-sp))))))
|
||||
(comp-emit-set-call (apply #'comp-call (cons subr-name slots))))))))
|
||||
(let* ((nargs (1+ (- sp-delta)))
|
||||
(arity (comp--func-arity subr-name))
|
||||
(minarg (car arity))
|
||||
(maxarg (cdr arity)))
|
||||
(when (eq maxarg 'unevalled)
|
||||
(signal 'native-ice (list "subr contains unevalled args" subr-name)))
|
||||
(if (eq maxarg 'many)
|
||||
;; callref case.
|
||||
(comp-emit-set-call (comp-callref subr-name nargs (comp-sp)))
|
||||
;; Normal call.
|
||||
(unless (and (>= maxarg nargs) (<= minarg nargs))
|
||||
(signal 'native-ice
|
||||
(list "incoherent stack adjustment" nargs maxarg minarg)))
|
||||
(let* ((subr-name subr-name)
|
||||
(slots (cl-loop for i from 0 below maxarg
|
||||
collect (comp-slot-n (+ i (comp-sp))))))
|
||||
(comp-emit-set-call (apply #'comp-call (cons subr-name slots)))))))
|
||||
|
||||
(eval-when-compile
|
||||
(defun comp-op-to-fun (x)
|
||||
|
|
|
@ -41,9 +41,6 @@
|
|||
|
||||
;; - Allow maintaining patches that are ported back onto regular
|
||||
;; packages and maintained between versions.
|
||||
;;
|
||||
;; - Add a heuristic for guessing a `:lisp-dir' when cloning directly
|
||||
;; from a URL.
|
||||
|
||||
;;; Code:
|
||||
|
||||
|
@ -58,7 +55,7 @@
|
|||
(defgroup package-vc nil
|
||||
"Manage packages from VC checkouts."
|
||||
:group 'package
|
||||
:link '(custom-manual "(emacs) Package from Source")
|
||||
:link '(custom-manual "(emacs) Fetching Package Sources")
|
||||
:prefix "package-vc-"
|
||||
:version "29.1")
|
||||
|
||||
|
|
|
@ -689,6 +689,10 @@ To record all your input, use `open-dribble-file'."
|
|||
(with-current-buffer standard-output
|
||||
(goto-char (point-min))
|
||||
(let ((comment-start ";; ")
|
||||
;; Prevent 'comment-indent' from handling a single
|
||||
;; semicolon as the beginning of a comment.
|
||||
(comment-start-skip ";; ")
|
||||
(comment-use-syntax nil)
|
||||
(comment-column 24))
|
||||
(while (not (eobp))
|
||||
(comment-indent)
|
||||
|
|
|
@ -476,7 +476,13 @@ lost after dumping")))
|
|||
;; At this point, we're ready to resume undo recording for scratch.
|
||||
(buffer-enable-undo "*scratch*")
|
||||
|
||||
(defvar comp-subr-arities-h)
|
||||
(when (featurep 'native-compile)
|
||||
;; Save the arity for all primitives so the compiler can always
|
||||
;; retrive it even in case of redefinition.
|
||||
(mapatoms (lambda (f)
|
||||
(when (subr-primitive-p (symbol-function f))
|
||||
(puthash f (func-arity f) comp-subr-arities-h))))
|
||||
;; Fix the compilation unit filename to have it working when
|
||||
;; installed or if the source directory got moved. This is set to be
|
||||
;; a pair in the form of:
|
||||
|
|
|
@ -64,22 +64,23 @@ The action to be taken can be further customized via
|
|||
:version "28.1"
|
||||
:type 'regexp)
|
||||
|
||||
(defcustom eww-download-directory "~/Downloads/"
|
||||
"Default directory where `eww' saves downloaded files."
|
||||
(defcustom eww-default-download-directory "~/Downloads/"
|
||||
"Default directory where `eww' saves downloaded files.
|
||||
Used by `eww--download-directory', which see."
|
||||
:version "29.1"
|
||||
:group 'eww
|
||||
:type 'directory)
|
||||
|
||||
(defun eww--download-directory ()
|
||||
"Return the name of the EWW download directory.
|
||||
The default is specified by `eww-download-directory'; however,
|
||||
The default is specified by `eww-default-download-directory'; however,
|
||||
if that directory doesn't exist and the DOWNLOAD XDG user directory
|
||||
is defined, use the latter instead."
|
||||
(or (and (file-exists-p eww-download-directory)
|
||||
eww-download-directory)
|
||||
(or (and (file-exists-p eww-default-download-directory)
|
||||
eww-default-download-directory)
|
||||
(when-let ((dir (xdg-user-dir "DOWNLOAD")))
|
||||
(file-name-as-directory dir))
|
||||
eww-download-directory))
|
||||
eww-default-download-directory))
|
||||
|
||||
(defcustom eww-download-directory 'eww--download-directory
|
||||
"Directory where files will downloaded.
|
||||
|
|
|
@ -1641,10 +1641,9 @@ If optional MARKER, return a marker instead"
|
|||
(normalized (if (and (not remote-prefix)
|
||||
(eq system-type 'windows-nt)
|
||||
(cl-plusp (length retval)))
|
||||
(substring retval 1)
|
||||
(w32-long-file-name (substring retval 1))
|
||||
retval)))
|
||||
(concat remote-prefix normalized))
|
||||
|
||||
uri)))
|
||||
|
||||
(defun eglot--snippet-expansion-fn ()
|
||||
|
@ -1916,6 +1915,7 @@ Use `eglot-managed-p' to determine if current buffer is managed.")
|
|||
(defun eglot--managed-mode-off ()
|
||||
"Turn off `eglot--managed-mode' unconditionally."
|
||||
(remove-overlays nil nil 'eglot--overlay t)
|
||||
(eglot-inlay-hints-mode -1)
|
||||
(eglot--managed-mode -1))
|
||||
|
||||
(defun eglot-current-server ()
|
||||
|
|
|
@ -41,6 +41,16 @@
|
|||
:safe 'integerp
|
||||
:group 'typescript)
|
||||
|
||||
(defface typescript-ts-jsx-tag-face
|
||||
'((t . (:inherit font-lock-function-call-face)))
|
||||
"Face for HTML tags like <div> and <p> in JSX."
|
||||
:group 'typescript)
|
||||
|
||||
(defface typescript-ts-jsx-attribute-face
|
||||
'((t . (:inherit font-lock-constant-face)))
|
||||
"Face for HTML attributes like name and id in JSX."
|
||||
:group 'typescript)
|
||||
|
||||
(defvar typescript-ts-mode--syntax-table
|
||||
(let ((table (make-syntax-table)))
|
||||
;; Taken from the cc-langs version
|
||||
|
@ -284,17 +294,17 @@ Argument LANGUAGE is either `typescript' or `tsx'."
|
|||
:feature 'jsx
|
||||
`((jsx_opening_element
|
||||
[(nested_identifier (identifier)) (identifier)]
|
||||
@font-lock-function-call-face)
|
||||
@typescript-ts-jsx-tag-face)
|
||||
|
||||
(jsx_closing_element
|
||||
[(nested_identifier (identifier)) (identifier)]
|
||||
@font-lock-function-call-face)
|
||||
@typescript-ts-jsx-tag-face)
|
||||
|
||||
(jsx_self_closing_element
|
||||
[(nested_identifier (identifier)) (identifier)]
|
||||
@font-lock-function-call-face)
|
||||
@typescript-ts-jsx-tag-face)
|
||||
|
||||
(jsx_attribute (property_identifier) @font-lock-constant-face))
|
||||
(jsx_attribute (property_identifier) @typescript-ts-jsx-attribute-face))
|
||||
|
||||
:language language
|
||||
:feature 'number
|
||||
|
@ -438,7 +448,12 @@ See `treesit-sexp-type-regexp' for more information.")
|
|||
|
||||
;;;###autoload
|
||||
(define-derived-mode tsx-ts-mode typescript-ts-base-mode "TypeScript[TSX]"
|
||||
"Major mode for editing TypeScript."
|
||||
"Major mode for editing TSX and JSX documents.
|
||||
|
||||
This major mode defines two additional JSX-specific faces:
|
||||
`typescript-ts-jsx-attribute-face' and
|
||||
`typescript-ts-jsx-attribute-face' that are used for HTML tags
|
||||
and attributes, respectively."
|
||||
:group 'typescript
|
||||
:syntax-table typescript-ts-mode--syntax-table
|
||||
|
||||
|
|
|
@ -5910,6 +5910,14 @@ For internal use. */);
|
|||
Vcomp_loaded_comp_units_h =
|
||||
CALLN (Fmake_hash_table, QCweakness, Qvalue, QCtest, Qequal);
|
||||
|
||||
DEFVAR_LISP ("comp-subr-arities-h", Vcomp_subr_arities_h,
|
||||
doc: /* Hash table recording the arity of Lisp primitives.
|
||||
This is in case they are redefined so the compiler still knows how to
|
||||
compile calls to them.
|
||||
subr-name -> arity
|
||||
For internal use. */);
|
||||
Vcomp_subr_arities_h = CALLN (Fmake_hash_table, QCtest, Qequal);
|
||||
|
||||
Fprovide (intern_c_string ("native-compile"), Qnil);
|
||||
#endif /* #ifdef HAVE_NATIVE_COMP */
|
||||
|
||||
|
|
|
@ -18546,8 +18546,9 @@ try_scrolling (Lisp_Object window, bool just_this_one_p,
|
|||
start_display (&it, w, startp);
|
||||
|
||||
if (arg_scroll_conservatively)
|
||||
amount_to_scroll = max (dy, frame_line_height
|
||||
* max (scroll_step, temp_scroll_step));
|
||||
amount_to_scroll
|
||||
= min (max (dy, frame_line_height),
|
||||
frame_line_height * arg_scroll_conservatively);
|
||||
else if (scroll_step || temp_scroll_step)
|
||||
amount_to_scroll = scroll_max;
|
||||
else
|
||||
|
|
|
@ -446,7 +446,7 @@ https://lists.gnu.org/archive/html/bug-gnu-emacs/2020-03/msg00914.html."
|
|||
(should (equal comp-test-primitive-advice '(3 4))))
|
||||
(advice-remove #'+ f))))
|
||||
|
||||
(defvar comp-test-primitive-redefine-args)
|
||||
(defvar comp-test-primitive-redefine-args nil)
|
||||
(comp-deftest primitive-redefine ()
|
||||
"Test effectiveness of primitive redefinition."
|
||||
(cl-letf ((comp-test-primitive-redefine-args nil)
|
||||
|
@ -532,6 +532,22 @@ https://lists.gnu.org/archive/html/bug-gnu-emacs/2020-03/msg00914.html."
|
|||
(should (subr-native-elisp-p
|
||||
(symbol-function 'comp-test-48029-nonascii-žžž-f))))
|
||||
|
||||
(comp-deftest 61917-1 ()
|
||||
"Verify we can compile calls to redefined primitives with
|
||||
dedicated byte-op code."
|
||||
(let (x
|
||||
(f (lambda (fn &rest args)
|
||||
(setq comp-test-primitive-redefine-args args))))
|
||||
(advice-add #'delete-region :around f)
|
||||
(unwind-protect
|
||||
(setf x (native-compile
|
||||
'(lambda ()
|
||||
(delete-region 1 2))))
|
||||
(should (subr-native-elisp-p x))
|
||||
(funcall x)
|
||||
(advice-remove #'delete-region f)
|
||||
(should (equal comp-test-primitive-redefine-args '(1 2))))))
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Tromey's tests. ;;
|
||||
|
|
Loading…
Add table
Reference in a new issue