Merge remote-tracking branch 'origin/master' into feature/android

This commit is contained in:
Po Lu 2023-02-15 12:24:22 +08:00
commit a62fa69ec9
33 changed files with 601 additions and 466 deletions

View file

@ -4185,8 +4185,12 @@ XWIDGETS_OBJ=
if test "$with_xwidgets" != "no"; then
if test "$USE_GTK_TOOLKIT" = "GTK3" && test "$window_system" != "none"; then
WEBKIT_REQUIRED=2.12
WEBKIT_MODULES="webkit2gtk-4.0 >= $WEBKIT_REQUIRED"
WEBKIT_MODULES="webkit2gtk-4.1 >= $WEBKIT_REQUIRED"
EMACS_CHECK_MODULES([WEBKIT], [$WEBKIT_MODULES])
if test "$HAVE_WEBKIT" = "no"; then
WEBKIT_MODULES="webkit2gtk-4.0 >= $WEBKIT_REQUIRED"
EMACS_CHECK_MODULES([WEBKIT], [$WEBKIT_MODULES])
fi
HAVE_XWIDGETS=$HAVE_WEBKIT
XWIDGETS_OBJ="xwidget.o"
if test "$HAVE_X_WINDOWS" = "yes" && test "${with_cairo}" = "no"; then

View file

@ -2553,7 +2553,7 @@ variable names have underscores replaced with dashes. For instance,
@code{mode_line_format} stores the value of @code{mode-line-format}.
@item overlays
The inveral tree containing this buffer's overlays.
The interval tree containing this buffer's overlays.
@item last_selected_window
This is the last window that was selected with this buffer in it, or @code{nil}

View file

@ -5291,7 +5291,7 @@ The following commands help to work with properties:
Set a property in the current entry. Both the property and the
value can be inserted using completion.
- {{{kbd(S-RIGHT)}}} (~org-property-next-allowed-values~), {{{kbd(S-LEFT)}}} (~org-property-previous-allowed-value~) ::
- {{{kbd(S-RIGHT)}}} (~org-property-next-allowed-value~), {{{kbd(S-LEFT)}}} (~org-property-previous-allowed-value~) ::
#+kindex: S-RIGHT
#+kindex: S-LEFT
@ -10252,9 +10252,9 @@ the other commands, point needs to be in the desired line.
Unmark entry for bulk action.
- {{{kbd(U)}}} (~org-agenda-bulk-remove-all-marks~) ::
- {{{kbd(U)}}} (~org-agenda-bulk-unmark-all~) ::
#+kindex: U
#+findex: org-agenda-bulk-remove-all-marks
#+findex: org-agenda-bulk-unmark-all
Unmark all marked entries for bulk action.
@ -11692,9 +11692,9 @@ When the variable ~org-export-dispatch-use-expert-ui~ is set to
a non-~nil~ value, Org prompts in the minibuffer. To switch back to
the hierarchical menu, press {{{kbd(?)}}}.
- {{{kbd(C-c C-e)}}} (~org-export~) ::
- {{{kbd(C-c C-e)}}} (~org-export-dispatch~) ::
#+kindex: C-c C-e
#+findex: org-export
#+findex: org-export-dispatch
Invokes the export dispatcher interface. The options show default
settings. The {{{kbd(C-u)}}} prefix argument preserves options from
@ -12232,7 +12232,7 @@ with the custom ID =theory=, you can use
The following command allows navigating to the included document:
- {{{kbd(C-c ')}}} (~org-edit~special~) ::
- {{{kbd(C-c ')}}} (~org-edit-special~) ::
#+kindex: C-c '
#+findex: org-edit-special
@ -14363,10 +14363,10 @@ executable. Without it, export cannot finish.
:DESCRIPTION: Invoking export.
:END:
- {{{kbd(C-c C-e o o)}}} (~org-export-to-odt~) ::
- {{{kbd(C-c C-e o o)}}} (~org-odt-export-to-odt~) ::
#+kindex: C-c C-e o o
#+findex: org-export-to-odt
#+findex: org-odt-export-to-odt
Export as OpenDocument Text file.
#+cindex: @samp{EXPORT_FILE_NAME}, property

View file

@ -83,50 +83,9 @@ mistaken compositions, this will now work as well.
This works like 'kill-matching-buffers', but without asking for
confirmation.
+++
** New helper variable 'transpose-sexps-function'.
Emacs now can set this variable to customize the behavior of the
'transpose-sexps' function.
+++
** New function 'transpose-sexps-default-function'.
The previous implementation is moved into its own function, to be
bound by 'transpose-sexps-function'.
** New function 'treesit-transpose-sexps'.
Tree-sitter now unconditionally sets 'transpose-sexps-function' for all
tree-sitter enabled modes. This functionality utilizes the new
'transpose-sexps-function'.
** Commands and variables to move by program statements
*** New variable 'forward-sentence-function'.
Major modes can now set this variable to customize the behavior of the
'forward-sentence' command.
*** New function 'forward-sentence-default-function'.
The previous implementation of 'forward-sentence' is moved into its
own function, to be bound by 'forward-sentence-function'.
*** New buffer-local variable 'treesit-sentence-type-regexp'.
Similarly to 'treesit-defun-type-regexp', this variable is used to
define "sentences" in tree-sitter enabled modes.
*** New function 'treesit-forward-sentence'.
All tree-sitter enabled modes that define 'treesit-sentence-type-regexp'
now set 'forward-sentence-function' to call 'treesit-forward-sentence'.
*** New buffer-local variable 'treesit-sexp-type-regexp'.
Similarly to 'treesit-defun-type-regexp', this variable is used to
define "sexps" in tree-sitter enabled modes.
*** New function 'treesit-forward-sexp'.
Tree-sitter conditionally sets 'forward-sexp-function' for major modes
that have defined 'treesit-sexp-type-regexp' to enable sexp-related
motion commands.
* Changes in Specialized Modes and Packages in Emacs 30.1
---
** Variable order and truncation can now be configured in 'gdb-many-windows'.
The new user option 'gdb-locals-table-row-config' allows users to
@ -265,11 +224,59 @@ these built in programs in a subprocess.
When a 'touchscreen-begin' or 'touchscreen-end' event is passed as the
POSITION argument, it will behave as if that event was a mouse event.
+++
** New functions for handling touch screen events.
The new functions 'touch-screen-track-tap' and
'touch-screen-track-drag' handle tracking common touch screen gestures
from within a command.
** Functions and variables to transpose sexps
+++
*** New helper variable 'transpose-sexps-function'.
Emacs now can set this variable to customize the behavior of the
'transpose-sexps' function.
+++
*** New function 'transpose-sexps-default-function'.
The previous implementation is moved into its own function, to be
bound by 'transpose-sexps-function'.
*** New function 'treesit-transpose-sexps'.
Tree-sitter now unconditionally sets 'transpose-sexps-function' for all
tree-sitter enabled modes. This functionality utilizes the new
'transpose-sexps-function'.
** Functions and variables to move by program statements
*** New variable 'forward-sentence-function'.
Major modes can now set this variable to customize the behavior of the
'forward-sentence' command.
*** New function 'forward-sentence-default-function'.
The previous implementation of 'forward-sentence' is moved into its
own function, to be bound by 'forward-sentence-function'.
*** New buffer-local variable 'treesit-sentence-type-regexp'.
Similarly to 'treesit-defun-type-regexp', this variable is used to
define "sentences" in tree-sitter enabled modes.
*** New function 'treesit-forward-sentence'.
All tree-sitter enabled modes that define 'treesit-sentence-type-regexp'
now set 'forward-sentence-function' to call 'treesit-forward-sentence'.
** Functions and variables to move by program sexps
*** New buffer-local variable 'treesit-sexp-type-regexp'.
Similarly to 'treesit-defun-type-regexp', this variable is used to
define "sexps" in tree-sitter enabled modes.
*** New function 'treesit-forward-sexp'.
Tree-sitter conditionally sets 'forward-sexp-function' for major modes
that have defined 'treesit-sexp-type-regexp' to enable sexp-related
motion commands.
>>>>>>> origin/master
** New or changed byte-compilation warnings
---

View file

@ -383,7 +383,8 @@ This variable is buffer-local."
"\\(?:" (regexp-opt password-word-equivalents) "\\|Response\\)"
"\\(?:\\(?:, try\\)? *again\\| (empty for no passphrase)\\| (again)\\)?"
;; "[[:alpha:]]" used to be "for", which fails to match non-English.
"\\(?: [[:alpha:]]+ .+\\)?[[:blank:]]*[::៖][[:space:]]*\\'"
"\\(?: [[:alpha:]]+ .+\\)?[[:blank:]]*"
"[" (apply #'string password-colon-equivalents) "][[:space:]]*\\'"
;; The ccrypt encryption dialog doesn't end with a colon, so
;; treat it specially.
"\\|^Enter encryption key: (repeat) *\\'"

View file

@ -2042,6 +2042,22 @@ If FOR-EFFECT is non-nil, the return value is assumed to be of no importance."
(let ((side-effect-free (if byte-compile-delete-errors
byte-compile-side-effect-free-ops
byte-compile-side-effect-and-error-free-ops))
;; Ops taking and produce a single value on the stack.
(unary-ops '( byte-not byte-length byte-list1 byte-nreverse
byte-car byte-cdr byte-car-safe byte-cdr-safe
byte-symbolp byte-consp byte-stringp
byte-listp byte-integerp byte-numberp
byte-add1 byte-sub1 byte-negate
;; There are more of these but the list is
;; getting long and the gain is typically small.
))
;; Ops producing a single result without looking at the stack.
(producer-ops '( byte-constant byte-varref
byte-point byte-point-max byte-point-min
byte-following-char byte-preceding-char
byte-current-column
byte-eolp byte-eobp byte-bolp byte-bobp
byte-current-buffer byte-widen))
(add-depth 0)
(keep-going 'first-time)
;; Create a cons cell as head of the list so that removing the first
@ -2151,31 +2167,39 @@ If FOR-EFFECT is non-nil, the return value is assumed to be of no importance."
;; be larger than necessary.
(setq add-depth 1))
t)))))
;;
;; dup varset-X discard --> varset-X
;; dup varbind-X discard --> varbind-X
;; dup stack-set-X discard --> stack-set-X-1
;; (the varbind variant can emerge from other optimizations)
;;
((and (eq 'byte-dup (car lap0))
(eq 'byte-discard (car lap2))
(memq (car lap1) '(byte-varset byte-varbind
byte-stack-set)))
(setq keep-going t)
;;
;; dup varset discard(N) --> varset discard(N-1)
;; dup varbind discard(N) --> varbind discard(N-1)
;; dup stack-set(M) discard(N) --> stack-set(M-1) discard(N-1), M>1
;; (the varbind variant can emerge from other optimizations)
;;
((and (eq 'byte-dup (car lap0))
(memq (car lap2) '(byte-discard byte-discardN))
(or (memq (car lap1) '(byte-varset byte-varbind))
(and (eq (car lap1) 'byte-stack-set)
(> (cdr lap1) 1))))
(setcdr prev (cdr rest)) ; remove dup
(setcdr (cdr rest) (cdddr rest)) ; remove discard
(cond ((not (eq (car lap1) 'byte-stack-set))
(byte-compile-log-lap " %s %s %s\t-->\t%s"
lap0 lap1 lap2 lap1))
((eql (cdr lap1) 1)
(byte-compile-log-lap " %s %s %s\t-->\t<deleted>"
lap0 lap1 lap2))
(t
(let ((n (1- (cdr lap1))))
(byte-compile-log-lap " %s %s %s\t-->\t%s"
lap0 lap1 lap2
(cons (car lap1) n))
(setcdr lap1 n)))))
(let ((new1 (if (eq (car lap1) 'byte-stack-set)
(cons 'byte-stack-set (1- (cdr lap1)))
lap1))
(n (if (eq (car lap2) 'byte-discard) 1 (cdr lap2))))
(setcar (cdr rest) new1)
(cl-assert (> n 0))
(cond
((> n 1)
(let ((new2 (if (> n 2)
(cons 'byte-discardN (1- n))
(cons 'byte-discard nil))))
(byte-compile-log-lap " %s %s %s\t-->\t%s %s"
lap0 lap1 lap2 new1 new2)
(setcar (cddr rest) new2)))
(t
(byte-compile-log-lap " %s %s %s\t-->\t%s"
lap0 lap1 lap2 new1)
;; discard(0) = nop, remove
(setcdr (cdr rest) (cdddr rest)))))
(setq keep-going t))
;;
;; not goto-X-if-nil --> goto-X-if-non-nil
;; not goto-X-if-non-nil --> goto-X-if-nil
@ -2421,12 +2445,7 @@ If FOR-EFFECT is non-nil, the return value is assumed to be of no importance."
;; const, varref, point etc.
;;
((and (eq (car (nth 2 rest)) 'byte-return)
(memq (car lap1) '( byte-constant byte-varref
byte-point byte-point-max byte-point-min
byte-following-char byte-preceding-char
byte-current-column
byte-eolp byte-eobp byte-bolp byte-bobp
byte-current-buffer byte-widen))
(memq (car lap1) producer-ops)
(or (memq (car lap0) '( byte-discard byte-discardN
byte-discardN-preserve-tos
byte-stack-set))
@ -2438,26 +2457,15 @@ If FOR-EFFECT is non-nil, the return value is assumed to be of no importance."
lap0 lap1 (nth 2 rest) lap1 (nth 2 rest)))
;;
;; discardN-preserve-tos OP return --> OP return
;; dup OP return --> OP return
;; where OP is 1->1 in stack use, like `not'.
;; (discardN-preserve-tos|dup) UNARY return --> UNARY return
;; where UNARY takes and produces a single value on the stack
;;
;; FIXME: ideally we should run this backwards, so that we could do
;; discardN-preserve-tos OP1...OPn return -> OP1..OPn return
;; but that would require a different approach.
;;
((and (eq (car (nth 2 rest)) 'byte-return)
(memq (car lap1)
'( byte-not
byte-symbolp byte-consp byte-stringp
byte-listp byte-integerp byte-numberp
byte-list1
byte-car byte-cdr byte-car-safe byte-cdr-safe
byte-length
byte-add1 byte-sub1 byte-negate byte-nreverse
;; There are more of these but the list is
;; getting long and the gain is small.
))
(memq (car lap1) unary-ops)
(or (memq (car lap0) '(byte-discardN-preserve-tos byte-dup))
(and (eq (car lap0) 'byte-stack-set)
(eql (cdr lap0) 1))))
@ -2785,14 +2793,32 @@ If FOR-EFFECT is non-nil, the return value is assumed to be of no importance."
(push newjmp (cdr rest)))
t)))))
;;
;; const discardN-preserve-tos ==> discardN const
;; const stack-set(1) ==> discard const
;;
((and (eq (car lap0) 'byte-constant)
;;
;; UNARY discardN-preserve-tos --> discardN-preserve-tos UNARY
;; where UNARY takes and produces a single value on the stack
;;
((and (memq (car lap0) unary-ops)
(or (eq (car lap1) 'byte-discardN-preserve-tos)
(and (eq (car lap1) 'byte-stack-set)
(eql (cdr lap1) 1))))
(eql (cdr lap1) 1)))
;; unless followed by return (which will eat the discard)
(not (eq (car lap2) 'byte-return)))
(setq keep-going t)
(byte-compile-log-lap " %s %s\t-->\t%s %s" lap0 lap1 lap1 lap0)
(setcar rest lap1)
(setcar (cdr rest) lap0))
;;
;; PRODUCER discardN-preserve-tos(X) --> discard(X) PRODUCER
;; where PRODUCER pushes a result without looking at the stack:
;; const, varref, point etc.
;;
((and (memq (car lap0) producer-ops)
(or (eq (car lap1) 'byte-discardN-preserve-tos)
(and (eq (car lap1) 'byte-stack-set)
(eql (cdr lap1) 1)))
;; unless followed by return (which will eat the discard)
(not (eq (car lap2) 'byte-return)))
(setq keep-going t)
(let ((newdiscard (if (eql (cdr lap1) 1)
(cons 'byte-discard nil)
@ -2801,6 +2827,7 @@ If FOR-EFFECT is non-nil, the return value is assumed to be of no importance."
" %s %s\t-->\t%s %s" lap0 lap1 newdiscard lap0)
(setf (car rest) newdiscard)
(setf (cadr rest) lap0)))
(t
;; If no rule matched, advance and try again.
(setq prev (cdr prev))))))))

View file

@ -134,7 +134,10 @@ the `clone' function."
(package-vc-install name spec))
((listp spec)
(package-vc--archives-initialize)
(package-vc--unpack (cadr pkg-descs) spec)))))))
(package-vc--unpack
(or (cadr (assoc name package-archive-contents))
(package-desc-create :name name :kind 'vc))
spec)))))))
;;;###autoload
(defcustom package-vc-selected-packages '()
@ -269,9 +272,9 @@ Populate `package-vc--archive-spec-alist' with the result.
If optional argument ASYNC is non-nil, perform the downloads
asynchronously."
(dolist (archive package-archives)
(condition-case-unless-debug nil
(condition-case err
(package--download-one-archive archive "elpa-packages.eld" async)
(error (message "Failed to download `%s' archive." (car archive))))))
(error (message "Failed to download `%s' archive: %S" (car archive) err)))))
(add-hook 'package-read-archive-hook #'package-vc--read-archive-data 20)
@ -426,8 +429,8 @@ version of that package."
((let* ((pac package-archive-contents)
(desc (cadr (assoc (car pkg) pac))))
(if desc
(let ((reqs (package-desc-reqs pkg)))
(push pkg to-install)
(let ((reqs (package-desc-reqs desc)))
(push desc to-install)
(mapc #'search reqs))
(push pkg missing))))))
(version-order (a b)
@ -600,8 +603,6 @@ PKG-SPEC is a package specification, a property list describing
how to fetch and build the package. See `package-vc--archive-spec-alist'
for details. The optional argument REV specifies a specific revision to
checkout. This overrides the `:branch' attribute in PKG-SPEC."
(unless pkg-desc
(setq pkg-desc (package-desc-create :name (car pkg-spec) :kind 'vc)))
(pcase-let* (((map :lisp-dir) pkg-spec)
(name (package-desc-name pkg-desc))
(dirname (package-desc-full-name pkg-desc))

View file

@ -172,7 +172,10 @@ inserted. They return the string as it should be inserted."
:type 'hook)
(defcustom eshell-password-prompt-regexp
(format "\\(%s\\)[^::៖]*[::៖]\\s *\\'" (regexp-opt password-word-equivalents))
(format "%s[^%s]*[%s]\\s *\\'"
(regexp-opt password-word-equivalents t)
(apply #'string password-colon-equivalents)
(apply #'string password-colon-equivalents))
"Regexp matching prompts for passwords in the inferior process.
This is used by `eshell-watch-for-password-prompt'."
:type 'regexp

View file

@ -68,38 +68,86 @@ representing names. For instance:
(defvar emoji--all-bases nil)
(defvar emoji--derived nil)
(defvar emoji--names (make-hash-table :test #'equal))
(defvar emoji--done-derived nil)
(define-multisession-variable emoji--recent (list "😀" "😖"))
(defvar emoji--insert-buffer)
;;;###autoload
(defun emoji-insert ()
;;;###autoload (autoload 'emoji-insert "emoji" nil t)
(transient-define-prefix emoji-insert ()
"Choose and insert an emoji glyph."
:variable-pitch t
[:class transient-columns
:setup-children emoji--setup-suffixes
:description emoji--group-description]
(interactive "*")
(emoji--init)
(unless (fboundp 'emoji--command-Emoji)
(emoji--define-transient))
(funcall (intern "emoji--command-Emoji")))
(emoji--setup-prefix 'emoji-insert "Emoji" nil
`(("Recent" ,@(multisession-value emoji--recent))
,@emoji--labels)))
;;;###autoload
(defun emoji-recent ()
;;;###autoload (autoload 'emoji-recent "emoji" nil t)
(transient-define-prefix emoji-recent ()
"Choose and insert one of the recently-used emoji glyphs."
:variable-pitch t
[:class transient-columns
:setup-children emoji--setup-suffixes
:description emoji--group-description]
(interactive "*")
(emoji--init)
(unless (fboundp 'emoji--command-Emoji)
(emoji--define-transient))
(funcall (emoji--define-transient
(cons "Recent" (multisession-value emoji--recent)) t)))
(emoji--setup-prefix 'emoji-recent "Recent" t
(multisession-value emoji--recent)))
;;;###autoload
(defun emoji-search ()
;;;###autoload (autoload 'emoji-search "emoji" nil t)
(transient-define-prefix emoji-search ()
"Choose and insert an emoji glyph by typing its Unicode name.
This command prompts for an emoji name, with completion, and
inserts it. It recognizes the Unicode Standard names of emoji,
and also consults the `emoji-alternate-names' alist."
:variable-pitch t
[:class transient-columns
:setup-children emoji--setup-suffixes
:description emoji--group-description]
(interactive "*")
(emoji--init)
(emoji--choose-emoji))
(pcase-let ((`(,glyph . ,derived) (emoji--read-emoji)))
(if derived
(emoji--setup-prefix 'emoji-search "Choose Emoji"
(list glyph)
(cons glyph derived))
(emoji--add-recent glyph)
(insert glyph))))
(defun emoji--setup-prefix (command title done-derived spec)
(transient-setup
command nil nil
:scope (if (eq transient-current-command command)
(cons (oref (transient-suffix-object) title)
(oref (transient-suffix-object) done-derived))
(cons title done-derived))
:value (if (eq transient-current-command command)
(oref (transient-suffix-object) children)
spec)))
(defun emoji--setup-suffixes (_)
(transient-parse-suffixes
(oref transient--prefix command)
(pcase-let ((`(,title . ,done-derived) (oref transient--prefix scope)))
(emoji--layout (oref transient--prefix command) title
(oref transient--prefix value) done-derived))))
(defun emoji--group-description ()
(car (oref transient--prefix scope)))
(defclass emoji--narrow (transient-suffix)
((title :initarg :title)
(done-derived :initarg :done-derived)
(children :initarg :children)))
(transient-define-suffix emoji-insert-glyph ()
"Insert the emoji you selected."
(interactive nil not-a-mode)
(let ((glyph (oref (transient-suffix-object) description)))
(emoji--add-recent glyph)
(insert glyph)))
;;;###autoload
(defun emoji-list ()
@ -179,11 +227,10 @@ the name is not known."
'help-echo (emoji--name glyph))))
(insert "\n\n"))))
(defun emoji--fontify-glyph (glyph &optional inhibit-derived)
(defun emoji--fontify-glyph (glyph &optional done-derived)
(propertize glyph 'face
(if (and (not inhibit-derived)
(or (null emoji--done-derived)
(not (gethash glyph emoji--done-derived)))
(if (and (not (or (eq done-derived t)
(member glyph done-derived)))
(gethash glyph emoji--derived))
;; If this emoji has derivations, use a special face
;; to tell the user.
@ -206,33 +253,30 @@ the name is not known."
:interactive nil
(setq-local truncate-lines t))
(defun emoji-list-select (event)
;;;###autoload (autoload 'emoji-list-select "emoji" nil t)
(transient-define-prefix emoji-list-select (event)
"Select the emoji under point."
:variable-pitch t
[:class transient-columns
:setup-children emoji--setup-suffixes
:description emoji--group-description]
(interactive (list last-nonmenu-event) emoji-list-mode)
(mouse-set-point event)
(let ((glyph (get-text-property (point) 'emoji-glyph)))
(unless glyph
(error "No emoji under point"))
(let ((derived (gethash glyph emoji--derived))
(end-func
(lambda ()
(let ((buf emoji--insert-buffer))
(quit-window)
(if (buffer-live-p buf)
(switch-to-buffer buf)
(error "Buffer disappeared"))))))
(if (not derived)
;; Glyph without derivations.
(progn
(emoji--add-recent glyph)
(funcall end-func)
(insert glyph))
;; Pop up a transient to choose between derivations.
(let ((emoji--done-derived (make-hash-table :test #'equal)))
(setf (gethash glyph emoji--done-derived) t)
(funcall
(emoji--define-transient (cons "Choose Emoji" (cons glyph derived))
nil end-func)))))))
(let ((buf emoji--insert-buffer))
(quit-window)
(if (buffer-live-p buf)
(switch-to-buffer buf)
(error "Buffer disappeared")))
(let ((derived (gethash glyph emoji--derived)))
(if derived
(emoji--setup-prefix 'emoji-list-select "Choose Emoji"
(list glyph)
(cons glyph derived))
(emoji--add-recent glyph)
(insert glyph)))))
(defun emoji-list-help ()
"Display the name of the emoji at point."
@ -476,97 +520,51 @@ the name is not known."
(setq parent elem))
(nconc elem (list glyph)))))
(defun emoji--define-transient (&optional alist inhibit-derived
end-function)
(unless alist
(setq alist (cons "Emoji" emoji--labels)))
(let* ((mname (pop alist))
(name (intern (format "emoji--command-%s" mname)))
(emoji--done-derived (or emoji--done-derived
(make-hash-table :test #'equal)))
(has-subs (consp (cadr alist)))
(layout
(if has-subs
;; Define sub-maps.
(cl-loop for entry in
(emoji--compute-prefix
(if (equal mname "Emoji")
(cons (list "Recent") alist)
alist))
collect (list
(car entry)
(emoji--compute-name (cdr entry))
(if (equal (cadr entry) "Recent")
(emoji--recent-transient end-function)
(emoji--define-transient
(cons (concat mname " > " (cadr entry))
(cddr entry))))))
;; Insert an emoji.
(cl-loop for glyph in alist
for i in (append (number-sequence ?a ?z)
(number-sequence ?A ?Z)
(number-sequence ?0 ?9)
(number-sequence ?! ?/))
collect (let ((this-glyph glyph))
(list
(string i)
(emoji--fontify-glyph
glyph inhibit-derived)
(let ((derived
(and (not inhibit-derived)
(not (gethash glyph
emoji--done-derived))
(gethash glyph emoji--derived))))
(if derived
;; We have a derived glyph, so add
;; another level.
(progn
(setf (gethash glyph
emoji--done-derived)
t)
(emoji--define-transient
(cons (concat mname " " glyph)
(cons glyph derived))
t end-function))
;; Insert the emoji.
(lambda ()
(interactive nil not-a-mode)
;; Allow switching to the correct
;; buffer.
(when end-function
(funcall end-function))
(emoji--add-recent this-glyph)
(insert this-glyph)))))))))
(args (apply #'vector mname
(emoji--columnize layout
(if has-subs 2 8)))))
;; There's probably a better way to do this...
(setf (symbol-function name)
(lambda ()
(interactive nil not-a-mode)
(transient-setup name)))
(pcase-let ((`(,class ,slots ,suffixes ,docstr ,_body)
(transient--expand-define-args (list args))))
(put name 'interactive-only t)
(put name 'function-documentation docstr)
(put name 'transient--prefix
(apply (or class 'transient-prefix) :command name
(cons :variable-pitch (cons t slots))))
(put name 'transient--layout
(transient-parse-suffixes name suffixes)))
name))
(defun emoji--layout (command title spec done-derived)
(let ((has-subs (consp (cadr spec))))
(emoji--columnize
(if has-subs
(cl-loop for (key desc . glyphs) in (emoji--compute-prefix spec)
collect
(list key
(emoji--compute-name (cons desc glyphs))
command
:class 'emoji--narrow
:title (concat title " > " desc)
:done-derived (or (string-suffix-p "Recent" desc)
done-derived)
:children glyphs))
(cl-loop for glyph in spec
for char in (emoji--char-sequence)
for key = (string char)
for derived = (and (not (or (eq done-derived t)
(member glyph done-derived)))
(gethash glyph emoji--derived))
collect
(if derived
(list key
(emoji--fontify-glyph glyph done-derived)
command
:class 'emoji--narrow
:title (concat title " " glyph)
:done-derived (or (eq done-derived t)
(cons glyph done-derived))
:children (cons glyph derived))
(list key
(emoji--fontify-glyph glyph done-derived)
'emoji-insert-glyph))))
(if has-subs 2 8))))
(defun emoji--recent-transient (end-function)
"Create a function to display a dynamically generated menu."
(lambda ()
(interactive)
(funcall (emoji--define-transient
(cons "Recent" (multisession-value emoji--recent))
t end-function))))
(defun emoji--char-sequence ()
(append (number-sequence ?a ?z)
(number-sequence ?A ?Z)
(number-sequence ?0 ?9)
(number-sequence ?! ?/)))
(defun emoji--add-recent (glyph)
"Add GLYPH to the set of recently used emojis."
(let ((recent (multisession-value emoji--recent)))
(set-text-properties 0 (length glyph) nil glyph)
(setq recent (delete glyph recent))
(push glyph recent)
;; Shorten the list.
@ -684,20 +682,6 @@ We prefer the earliest unique letter."
(gethash name emoji--all-bases))))
(cons glyph (gethash glyph emoji--derived))))))
(defun emoji--choose-emoji ()
(pcase-let ((`(,glyph . ,derived) (emoji--read-emoji)))
(if (not derived)
;; Simple glyph with no derivations.
(progn
(emoji--add-recent glyph)
(insert glyph))
;; Choose a derived version.
(let ((emoji--done-derived (make-hash-table :test #'equal)))
(setf (gethash glyph emoji--done-derived) t)
(funcall
(emoji--define-transient
(cons "Choose Emoji" (cons glyph derived))))))))
(defvar-keymap emoji-zoom-map
"+" #'emoji-zoom-increase
"-" #'emoji-zoom-decrease)

View file

@ -1734,6 +1734,20 @@ included; callers should bind `case-fold-search' to t."
:version "27.1"
:group 'processes)
;; (describe-char-fold-equivalences ?:)
;; The last entry is taken from history.
(defcustom password-colon-equivalents
'(?\u003a ; ?\N{COLON}
?\uff1a ; ?\N{FULLWIDTH COLON}
?\ufe55 ; ?\N{SMALL COLON}
?\ufe13 ; ?\N{PRESENTATION FORM FOR VERTICAL COLON}
?\u17d6 ; ?\N{KHMER SIGN CAMNUC PII KUUH}
)
"List of characters equivalent to trailing colon in \"password\" prompts."
:type '(repeat character)
:version "30.1"
:group 'processes)
;; The old code-pages library is obsoleted by coding systems based on
;; the charsets defined in this file but might be required by user
;; code.

View file

@ -2780,7 +2780,7 @@ it is disabled.
;;; Generated autoloads from emacs-lisp/byte-opt.el
(register-definition-prefixes "byte-opt" '("byte-" "disassemble-offset"))
(register-definition-prefixes "byte-opt" '("byte" "disassemble-offset"))
;;; Generated autoloads from emacs-lisp/bytecomp.el
@ -2921,7 +2921,7 @@ and corresponding effects.
;;; Generated autoloads from progmodes/c-ts-common.el
(register-definition-prefixes "c-ts-common" '("c-ts-"))
(register-definition-prefixes "c-ts-common" '("c-ts-common-"))
;;; Generated autoloads from progmodes/c-ts-mode.el
@ -7881,36 +7881,53 @@ Display-Line-Numbers mode.
(fn &optional ARG)" t)
(defvar header-line-indent "" "\
String to indent at the start if the header line.
This is used in `header-line-indent-mode', and buffers that have
this switched on should have a `header-line-format' that look like:
String of spaces to indent the beginning of header-line due to line numbers.
This is intended to be used in `header-line-format', and requires
the `header-line-indent-mode' to be turned on, in order for the width
of this string to be kept updated when the line-number width changes
on display. An example of a `header-line-format' that uses this
variable might look like this:
(\"\" header-line-indent THE-REST...)
where THE-REST is the format string which produces the actual text
of the header-line.
Also see `header-line-indent-width'.")
(defvar header-line-indent-width 0 "\
The width of the current line numbers displayed.
This is updated when `header-line-indent-mode' is switched on.
The width of the current line number display in the window.
This is measured in units of the frame's canonical columns.
This is updated when `header-line-indent-mode' is switched on,
and is intended for use in `:align-to' display specifications
that are part of `header-line-format', when portions of header-line
text should be aligned to respective parts of buffer text.
Also see `header-line-indent'.")
(autoload 'header-line-indent-mode "display-line-numbers" "\
Mode to indent the header line in `display-line-numbers-mode' buffers.
Minor mode to help with alignment of header line when line numbers are shown.
This means that the header line will be kept indented so that it
has blank space that's as wide as the displayed line numbers in
the buffer.
This minor mode should be turned on in buffers which display header-line
that needs to be aligned with buffer text when `display-line-numbers-mode'
is turned on in the buffer.
Buffers that have this switched on should have a
`header-line-format' that look like:
Buffers that have this switched on should have a `header-line-format'
that uses the `header-line-indent' or the `header-line-indent-width'
variables, which this mode will keep up-to-date with the current
display of line numbers. For example, a `header-line-format' that
looks like this:
(\"\" header-line-indent THE-REST...)
The `header-line-indent-width' variable is also kept updated, and
has the width of `header-line-format'. This can be used, for
instance, in `:align-to' specs, like:
will make sure the text produced by THE-REST (which should be
a header-line format string) is always indented to be aligned on
display with the first column of buffer text.
The `header-line-indent-width' variable is also kept updated,
and can be used, for instance, in `:align-to' specs as part
of `header-line-format', like this:
(space :align-to (+ header-line-indent-width 10))
See also `line-number-display-width'.
This is a minor mode. If called interactively, toggle the
`Header-Line-Indent mode' mode. If the prefix argument is
positive, enable the mode, and if it is zero or negative, disable
@ -9741,15 +9758,9 @@ Emerge two RCS revisions of a file, with another revision as ancestor.
;;; Generated autoloads from international/emoji.el
(autoload 'emoji-insert "emoji" "\
Choose and insert an emoji glyph." t)
(autoload 'emoji-recent "emoji" "\
Choose and insert one of the recently-used emoji glyphs." t)
(autoload 'emoji-search "emoji" "\
Choose and insert an emoji glyph by typing its Unicode name.
This command prompts for an emoji name, with completion, and
inserts it. It recognizes the Unicode Standard names of emoji,
and also consults the `emoji-alternate-names' alist." t)
(autoload 'emoji-insert "emoji" nil t)
(autoload 'emoji-recent "emoji" nil t)
(autoload 'emoji-search "emoji" nil t)
(autoload 'emoji-list "emoji" "\
List emojis and insert the one that's selected.
Select the emoji by typing \\<emoji-list-mode-map>\\[emoji-list-select] on its picture.
@ -9765,6 +9776,11 @@ If called from Lisp, return the name as a string; return nil if
the name is not known.
(fn GLYPH &optional INTERACTIVE)" t)
(autoload 'emoji-list-select "emoji" nil t)
(autoload 'emoji--init "emoji" "\
(fn &optional FORCE INHIBIT-ADJUST)")
(autoload 'emoji-zoom-increase "emoji" "\
Increase the size of the character under point.
FACTOR is the multiplication factor for the size.
@ -15821,7 +15837,7 @@ it is disabled.
;;; Generated autoloads from progmodes/hideshow.el
(defvar hs-special-modes-alist (mapcar #'purecopy '((c-mode "{" "}" "/[*/]" nil nil) (c++-mode "{" "}" "/[*/]" nil nil) (bibtex-mode ("@\\S(*\\(\\s(\\)" 1)) (java-mode "{" "}" "/[*/]" nil nil) (js-mode "{" "}" "/[*/]" nil) (mhtml-mode "{\\|<[^/>]*?" "}\\|</[^/>]*[^/]>" "<!--" mhtml-forward nil))) "\
(defvar hs-special-modes-alist (mapcar #'purecopy '((c-mode "{" "}" "/[*/]" nil nil) (c-ts-mode "{" "}" "/[*/]" nil nil) (c++-mode "{" "}" "/[*/]" nil nil) (c++-ts-mode "{" "}" "/[*/]" nil nil) (bibtex-mode ("@\\S(*\\(\\s(\\)" 1)) (java-mode "{" "}" "/[*/]" nil nil) (java-ts-mode "{" "}" "/[*/]" nil nil) (js-mode "{" "}" "/[*/]" nil) (js-ts-mode "{" "}" "/[*/]" nil) (mhtml-mode "{\\|<[^/>]*?" "}\\|</[^/>]*[^/]>" "<!--" mhtml-forward nil))) "\
Alist for initializing the hideshow variables for different modes.
Each element has the form
(MODE START END COMMENT-START FORWARD-SEXP-FUNC ADJUST-BEG-FUNC
@ -17321,12 +17337,12 @@ Return non-nil if there is an image at point.")
;;; Generated autoloads from image/image-converter.el
(autoload 'image-converter-add-handler "image-converter" "\
Make Emacs use CONVERTER to parse image files that end with SUFFIX.
CONVERTER is a function with two parameters, where the first is
the file name or a string with the image data, and the second is
non-nil if the first parameter is image data. The converter
should output the image in the current buffer, converted to
`image-convert-to-format'.
Make Emacs use CONVERTER to parse image files whose names end with SUFFIX.
CONVERTER is a function with two arguments, the file name or a string
with the image data, and a non-nil value if the first argument is image data.
The converter should produce the image in the current buffer, converted to
the format given by `image-convert-to-format'.
SUFFIX should not include the leading dot.
(fn SUFFIX CONVERTER)")
(register-definition-prefixes "image-converter" '("image-convert"))
@ -17370,9 +17386,9 @@ Open directory DIR and create a default window configuration.
Convenience command that:
- Opens Dired in folder DIR
- Splits windows in most useful (?) way
- Sets `truncate-lines' to t
- opens Dired in folder DIR;
- splits windows in most useful (?) way; and
- sets `truncate-lines' to t
After the command has finished, you would typically mark some
image files in Dired and type
@ -17430,11 +17446,12 @@ Default bookmark handler for Image-Dired buffers.
;;; Generated autoloads from image/image-dired-dired.el
(autoload 'image-dired-dired-toggle-marked-thumbs "image-dired-dired" "\
Toggle thumbnails in front of file names in the Dired buffer.
If no marked file could be found, insert or hide thumbnails on the
current line. ARG, if non-nil, specifies the files to use instead
of the marked files. If ARG is an integer, use the next ARG (or
previous -ARG, if ARG<0) files.
Toggle thumbnails in front of marked file names in the Dired buffer.
If no file is marked, toggle display of thumbnail on the current file's line.
ARG, if non-nil (interactively, the prefix argument), specifies the files
whose thumbnail display to toggle instead of the marked files: if ARG is an
integer, use the next ARG (or previous -ARG, if ARG<0) files; any other
value of ARG means toggle thumbnail display of the current line's file.
(fn &optional ARG)" '(dired-mode))
(autoload 'image-dired-jump-thumbnail-buffer "image-dired-dired" "\
@ -17486,7 +17503,8 @@ Append thumbnails to `image-dired-thumbnail-buffer'." '(dired-mode))
(autoload 'image-dired-display-thumb "image-dired-dired" "\
Shorthand for `image-dired-display-thumbs' with prefix argument." '(dired-mode))
(autoload 'image-dired-dired-display-external "image-dired-dired" "\
Display file at point using an external viewer." '(dired-mode))
Display file at point using an external viewer.
The viewer is specified by the value of `image-dired-external-viewer'." '(dired-mode))
(autoload 'image-dired-dired-display-image "image-dired-dired" "\
Display current image file.
See documentation for `image-dired-display-image' for more information.
@ -17494,11 +17512,11 @@ See documentation for `image-dired-display-image' for more information.
(fn &optional _)" '(dired-mode))
(set-advertised-calling-convention 'image-dired-dired-display-image 'nil '"29.1")
(autoload 'image-dired-mark-tagged-files "image-dired-dired" "\
Use REGEXP to mark files with matching tag.
Mark files whose tag matches REGEXP.
A `tag' is a keyword, a piece of meta data, associated with an
image file and stored in image-dired's database file. This command
lets you input a regexp and this will be matched against all tags
on all image files in the database file. The files that have a
prompts for a regexp, and then matches it against all the tags
of all the image files in the database file. The files that have a
matching tag will be marked in the Dired buffer.
(fn REGEXP)" '(dired-mode))
@ -17513,7 +17531,8 @@ matching tag will be marked in the Dired buffer.
;;; Generated autoloads from image/image-dired-tags.el
(autoload 'image-dired-tag-files "image-dired-tags" "\
Tag marked file(s) in Dired. With prefix ARG, tag file at point.
Tag file(s) which are marked in a Dired buffer.
With prefix ARG, tag the file at point.
(fn ARG)" '(dired-mode))
(autoload 'image-dired-delete-tag "image-dired-tags" "\
@ -18326,7 +18345,9 @@ Add submenus to the File menu, to convert to and from various formats." t)
(put 'ispell-check-comments 'safe-local-variable (lambda (a) (memq a '(nil t exclusive))))
(defvar ispell-personal-dictionary nil "\
File name of your personal spelling dictionary, or nil.
If nil, the default personal dictionary for your spelling checker is used.")
If nil, the default personal dictionary for your spelling checker is used.
Due to a misfeature of Hunspell, if the value is an absolute file name, the
file by that name must already exist for Hunspell to be able to use it.")
(custom-autoload 'ispell-personal-dictionary "ispell" t)
(put 'ispell-local-dictionary 'safe-local-variable 'string-or-null-p)
(defconst ispell-menu-map (let ((map (make-sparse-keymap "Spell"))) (define-key map [ispell-change-dictionary] `(menu-item ,(purecopy "Change Dictionary...") ispell-change-dictionary :help ,(purecopy "Supply explicit dictionary file name"))) (define-key map [ispell-kill-ispell] `(menu-item ,(purecopy "Kill Process") (lambda nil (interactive) (ispell-kill-ispell nil 'clear)) :enable (and (boundp 'ispell-process) ispell-process (eq (ispell-process-status) 'run)) :help ,(purecopy "Terminate Ispell subprocess"))) (define-key map [ispell-pdict-save] `(menu-item ,(purecopy "Save Dictionary") (lambda nil (interactive) (ispell-pdict-save t t)) :help ,(purecopy "Save personal dictionary"))) (define-key map [ispell-customize] `(menu-item ,(purecopy "Customize...") (lambda nil (interactive) (customize-group 'ispell)) :help ,(purecopy "Customize spell checking options"))) (define-key map [ispell-help] `(menu-item ,(purecopy "Help") (lambda nil (interactive) (describe-function 'ispell-help)) :help ,(purecopy "Show standard Ispell keybindings and commands"))) (define-key map [flyspell-mode] `(menu-item ,(purecopy "Automatic spell checking (Flyspell)") flyspell-mode :help ,(purecopy "Check spelling while you edit the text") :button (:toggle bound-and-true-p flyspell-mode))) (define-key map [ispell-complete-word] `(menu-item ,(purecopy "Complete Word") ispell-complete-word :help ,(purecopy "Complete word at cursor using dictionary"))) (define-key map [ispell-complete-word-interior-frag] `(menu-item ,(purecopy "Complete Word Fragment") ispell-complete-word-interior-frag :help ,(purecopy "Complete word fragment at cursor"))) (define-key map [ispell-continue] `(menu-item ,(purecopy "Continue Spell-Checking") ispell-continue :enable (and (boundp 'ispell-region-end) (marker-position ispell-region-end) (equal (marker-buffer ispell-region-end) (current-buffer))) :help ,(purecopy "Continue spell checking last region"))) (define-key map [ispell-word] `(menu-item ,(purecopy "Spell-Check Word") ispell-word :help ,(purecopy "Spell-check word at cursor"))) (define-key map [ispell-comments-and-strings] `(menu-item ,(purecopy "Spell-Check Comments") ispell-comments-and-strings :help ,(purecopy "Spell-check only comments and strings"))) (define-key map [ispell-region] `(menu-item ,(purecopy "Spell-Check Region") ispell-region :enable mark-active :help ,(purecopy "Spell-check text in marked region"))) (define-key map [ispell-message] `(menu-item ,(purecopy "Spell-Check Message") ispell-message :visible (eq major-mode 'mail-mode) :help ,(purecopy "Skip headers and included message text"))) (define-key map [ispell-buffer] `(menu-item ,(purecopy "Spell-Check Buffer") ispell-buffer :help ,(purecopy "Check spelling of selected buffer"))) map) "\
@ -26561,8 +26582,12 @@ or call the function `repeat-mode'.")
(autoload 'repeat-mode "repeat" "\
Toggle Repeat mode.
When Repeat mode is enabled, and the command symbol has the property named
`repeat-map', this map is activated temporarily for the next command.
When Repeat mode is enabled, certain commands bound to multi-key
sequences can be repeated by typing a single key, after typing the
full key sequence once.
The commands which can be repeated like that are those whose symbol
has the property `repeat-map' which specifies a keymap of single
keys for repeating.
See `describe-repeat-maps' for a list of all repeatable commands.
This is a global minor mode. If called interactively, toggle the

View file

@ -275,6 +275,19 @@ Add the extension of F, if existing."
(autoload 'netrc-parse "netrc")
(netrc-parse file))))
;; User option `password-colon-equivalents' is new in Emacs 30.1.
(if (boundp 'password-colon-equivalents)
(defvaralias
'tramp-compat-password-colon-equivalents
'password-colon-equivalents)
(defvar tramp-compat-password-colon-equivalents
'(?\N{COLON}
?\N{FULLWIDTH COLON}
?\N{SMALL COLON}
?\N{PRESENTATION FORM FOR VERTICAL COLON}
?\N{KHMER SIGN CAMNUC PII KUUH})
"List of characters equivalent to trailing colon in \"password\" prompts."))
(dolist (elt (all-completions "tramp-compat-" obarray 'functionp))
(put (intern elt) 'tramp-suppress-trace t))

View file

@ -133,7 +133,7 @@ been set up by `rfn-eshadow-setup-minibuffer'."
;; Use `path-separator' as it does eshell.
(setq eshell-path-env
(if (file-remote-p default-directory)
(mapconcat #'identity (butlast (exec-path)) path-separator)
(string-join (butlast (exec-path)) path-separator)
(getenv "PATH"))))
(with-eval-after-load 'esh-util
@ -345,8 +345,7 @@ NAME must be equal to `tramp-current-connection'."
(defconst tramp-bsd-process-attributes-ps-args
`("-acxww"
"-o"
,(mapconcat
#'identity
,(string-join
'("pid"
"euid"
"user"
@ -355,8 +354,7 @@ NAME must be equal to `tramp-current-connection'."
"comm=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
",")
"-o"
,(mapconcat
#'identity
,(string-join
'("state"
"ppid"
"pgid"
@ -419,8 +417,7 @@ See `tramp-process-attributes-ps-format'.")
;; Tested with BusyBox v1.24.1.
(defconst tramp-busybox-process-attributes-ps-args
`("-o"
,(mapconcat
#'identity
,(string-join
'("pid"
"user"
"group"
@ -428,8 +425,7 @@ See `tramp-process-attributes-ps-format'.")
",")
"-o" "stat=abcde"
"-o"
,(mapconcat
#'identity
,(string-join
'("ppid"
"pgid"
"tty"
@ -472,8 +468,7 @@ See `tramp-process-attributes-ps-format'.")
(defconst tramp-darwin-process-attributes-ps-args
`("-acxww"
"-o"
,(mapconcat
#'identity
,(string-join
'("pid"
"uid"
"user"
@ -482,8 +477,7 @@ See `tramp-process-attributes-ps-format'.")
",")
"-o" "state=abcde"
"-o"
,(mapconcat
#'identity
,(string-join
'("ppid"
"pgid"
"sess"

View file

@ -2392,8 +2392,7 @@ The method used must be an out-of-band method."
v 'file-error
"Cannot find remote listener: %s" remote-copy-program))
(setq remote-copy-program
(mapconcat
#'identity
(string-join
(append
(list remote-copy-program) remote-copy-args
(list (if v1 (concat "<" source) (concat ">" target)) "&"))
@ -3010,8 +3009,7 @@ implementation will be used."
;; We must also disable buffering,
;; otherwise strings larger than 4096
;; bytes, sent by the process, could
;; block, see termios(3) and
;; <https://github.com/emacs-lsp/lsp-mode/issues/2375#issuecomment-1407272718>.
;; block, see termios(3) and Bug#61341.
;; FIXME: Shall we rather use "stty raw"?
(if (tramp-check-remote-uname v "Darwin")
(tramp-send-command
@ -3118,8 +3116,7 @@ implementation will be used."
(format
"%s %s %s"
(tramp-get-method-parameter vec 'tramp-remote-shell)
(mapconcat
#'identity
(string-join
(tramp-get-method-parameter vec 'tramp-remote-shell-args)
" ")
(tramp-shell-quote-argument (format "kill -%d $$" i))))
@ -4972,7 +4969,7 @@ Goes through the list `tramp-inline-compress-commands'."
(tramp-call-process
vec1 tramp-encoding-shell nil t nil
tramp-encoding-command-switch
(mapconcat #'identity command " "))
(string-join command " "))
(goto-char (point-min))
(not (search-forward "remotecommand" nil 'noerror)))))
@ -4991,11 +4988,11 @@ Goes through the list `tramp-inline-compress-commands'."
found string)
(with-temp-buffer
;; Check hostkey of VEC2, seen from VEC1.
(tramp-send-command vec1 (mapconcat #'identity command " "))
(tramp-send-command vec1 (string-join command " "))
;; Check hostkey of VEC2, seen locally.
(tramp-call-process
vec1 tramp-encoding-shell nil t nil tramp-encoding-command-switch
(mapconcat #'identity command " "))
(string-join command " "))
(goto-char (point-min))
(while (and (not found) (not (eobp)))
(setq string
@ -5219,8 +5216,7 @@ connection if a previous connection has died for some reason."
;; Replace `login-args' place holders.
(setq
command
(mapconcat
#'identity
(string-join
(append
;; We do not want to see the trailing local
;; prompt in `start-file-process'.
@ -5521,12 +5517,10 @@ Nonexistent directories are removed from spec."
(format
"%s %s %s 'echo %s \\\"$PATH\\\"'"
(tramp-get-method-parameter vec 'tramp-remote-shell)
(mapconcat
#'identity
(string-join
(tramp-get-method-parameter vec 'tramp-remote-shell-login)
" ")
(mapconcat
#'identity
(string-join
(tramp-get-method-parameter vec 'tramp-remote-shell-args)
" ")
(tramp-shell-quote-argument tramp-end-of-heredoc))

View file

@ -641,10 +641,11 @@ This regexp must match both `tramp-initial-end-of-output' and
:type 'regexp)
(defcustom tramp-password-prompt-regexp
(rx
bol (* nonl)
(group (regexp (regexp-opt password-word-equivalents)))
(* nonl) (any "::៖") (? "\^@") (* blank))
(rx-to-string
`(: bol (* nonl)
(group (| . ,password-word-equivalents))
(* nonl) (any . ,tramp-compat-password-colon-equivalents)
(? "\^@") (* blank)))
"Regexp matching password-like prompts.
The regexp should match at end of buffer.
@ -2961,6 +2962,8 @@ not in completion mode."
(concat dir filename))
((string-match-p
(rx bos (regexp tramp-prefix-regexp)
(* (regexp tramp-remote-file-name-spec-regexp)
(regexp tramp-postfix-hop-regexp))
(? (regexp tramp-method-regexp) (regexp tramp-postfix-method-regexp)
(? (regexp tramp-user-regexp) (regexp tramp-postfix-user-regexp)))
eos)
@ -2984,6 +2987,8 @@ not in completion mode."
(string-match
(rx
(regexp tramp-prefix-regexp)
(* (regexp tramp-remote-file-name-spec-regexp)
(regexp tramp-postfix-hop-regexp))
(group (regexp tramp-method-regexp))
(? (regexp tramp-postfix-method-regexp))
eos)
@ -2993,6 +2998,8 @@ not in completion mode."
((string-match
(rx
(regexp tramp-prefix-regexp)
(* (regexp tramp-remote-file-name-spec-regexp)
(regexp tramp-postfix-hop-regexp))
(group (regexp tramp-remote-file-name-spec-regexp))
eos)
filename)
@ -3249,30 +3256,31 @@ PARTIAL-USER must match USER, PARTIAL-HOST must match HOST."
;; method. In the `separate' file name syntax, we return "/[" when
;; `filename' is "/[string" w/o a trailing method separator "/".
(cond
((and (not (string-empty-p tramp-method-regexp))
(string-match
((string-match
(rx (group (regexp tramp-prefix-regexp)
(* (regexp tramp-remote-file-name-spec-regexp)
(regexp tramp-postfix-hop-regexp)))
(? (regexp tramp-completion-method-regexp)) eos)
filename)
(match-string 1 filename))
((and (string-match
(rx (group
(regexp tramp-prefix-regexp)
(* (regexp tramp-remote-file-name-spec-regexp)
(regexp tramp-postfix-hop-regexp))
(group (regexp tramp-method-regexp))
(regexp tramp-postfix-method-regexp)
(? (regexp tramp-user-regexp)
(regexp tramp-postfix-user-regexp))))
(regexp tramp-postfix-user-regexp)))
(? (| (regexp tramp-host-regexp)
(: (regexp tramp-prefix-ipv6-regexp)
(? (regexp tramp-ipv6-regexp)
(? (regexp tramp-postfix-ipv6-regexp))))))
eos)
filename)
;; Is it a valid method?
(assoc (match-string 2 filename) tramp-methods))
(match-string 1 filename))
((and (string-empty-p tramp-method-regexp)
(string-match
(rx (group
(regexp tramp-prefix-regexp)
(? (regexp tramp-user-regexp)
(regexp tramp-postfix-user-regexp))))
filename))
(match-string 1 filename))
((string-match
(rx (group (regexp tramp-prefix-regexp))
(regexp tramp-completion-method-regexp) eos)
filename)
(or (tramp-string-empty-or-nil-p (match-string 2 filename))
(assoc (match-string 2 filename) tramp-methods)))
(match-string 1 filename))
(t (tramp-run-real-handler #'file-name-directory (list filename)))))
@ -4519,8 +4527,7 @@ Return it as number of seconds. Used in `tramp-process-attributes-ps-format'."
(defconst tramp-process-attributes-ps-args
`("-eww"
"-o"
,(mapconcat
#'identity
,(string-join
'("pid"
"euid"
"euser"
@ -4994,7 +5001,7 @@ substitution. SPEC-LIST is a list of char/value pairs used for
(if (consp (tramp-get-method-parameter v 'tramp-direct-async))
(append
(tramp-get-method-parameter v 'tramp-direct-async)
`(,(mapconcat #'identity command " ")))
`(,(string-join command " ")))
command)))
;; Check for `tramp-sh-file-name-handler', because something
@ -5890,8 +5897,7 @@ the remote host use line-endings as defined in the variable
(let ((inhibit-read-only t)) (delete-region (point-min) (point-max)))
;; Replace "\n" by `tramp-rsh-end-of-line'.
(setq string
(mapconcat
#'identity (split-string string "\n") tramp-rsh-end-of-line))
(string-join (split-string string "\n") tramp-rsh-end-of-line))
(unless (or (string-empty-p string)
(string-equal (substring string -1) tramp-rsh-end-of-line))
(setq string (concat string tramp-rsh-end-of-line)))
@ -6589,7 +6595,7 @@ verbosity of 6."
(apply #'process-lines program args)
(error
(tramp-error vec (car err) (cdr err)))))
(tramp-message vec 6 "\n%s" (mapconcat #'identity result "\n"))
(tramp-message vec 6 "\n%s" (string-join result "\n"))
result))
(defun tramp-process-running-p (process-name)

View file

@ -59,7 +59,7 @@ Writes QUERY into a temp-buffer that is processed with
(let ((error-buffer (get-buffer-create " *Org-Babel Error*")) exit-code)
(with-current-buffer error-buffer (erase-buffer))
(with-temp-buffer
(insert query)
(insert query "\n")
(setq exit-code
(org-babel--shell-command-on-region
command error-buffer))

View file

@ -234,7 +234,7 @@ database connections."
(:database . sql-database)))
(mapped-name (cdr (assq name name-mapping))))
(cadr (assq mapped-name
(cdr (assoc dbconnection sql-connection-alist))))))))
(cdr (assoc-string dbconnection sql-connection-alist t))))))))
(defun org-babel-execute:sql (body params)
"Execute a block of Sql code with Babel.

View file

@ -8211,7 +8211,7 @@ filter."
(if (and org-agenda-filtered-by-category
org-agenda-category-filter)
(org-agenda-filter-show-all-cat)
(let ((cat (org-no-properties (org-get-at-eol 'org-category 1))))
(let ((cat (org-no-properties (org-agenda-get-category))))
(cond
((and cat strip)
(org-agenda-filter-apply

View file

@ -196,11 +196,13 @@ removed."
;;; Emacs < 27.1 compatibility
(unless (fboundp 'combine-change-calls)
;; A stub when `combine-change-calls' was not yet there.
(defmacro combine-change-calls (_beg _end &rest body)
(declare (debug (form form def-body)) (indent 2))
`(progn ,@body)))
(if (version< emacs-version "29")
;; A stub when `combine-change-calls' was not yet there or had
;; critical bugs (see Emacs bug#60467).
(defmacro org-combine-change-calls (_beg _end &rest body)
(declare (debug (form form def-body)) (indent 2))
`(progn ,@body))
(defalias 'org-combine-change-calls 'combine-change-calls))
(if (version< emacs-version "27.1")
(defsubst org-replace-buffer-contents (source &optional _max-secs _max-costs)

View file

@ -7406,14 +7406,16 @@ the cache."
(org-element-at-point to-pos)
(cl-macrolet ((cache-root
;; Use the most optimal version of cache available.
() `(if (memq granularity '(headline headline+inlinetask))
(org-element--headline-cache-root)
(org-element--cache-root)))
() `(org-with-base-buffer nil
(if (memq granularity '(headline headline+inlinetask))
(org-element--headline-cache-root)
(org-element--cache-root))))
(cache-size
;; Use the most optimal version of cache available.
() `(if (memq granularity '(headline headline+inlinetask))
org-element--headline-cache-size
org-element--cache-size))
() `(org-with-base-buffer nil
(if (memq granularity '(headline headline+inlinetask))
org-element--headline-cache-size
org-element--cache-size)))
(cache-walk-restart
;; Restart tree traversal after AVL tree re-balance.
() `(when node
@ -7443,8 +7445,9 @@ the cache."
;; Avoid extra staff like timer cancels et al
;; and only call `org-element--cache-sync-requests' when
;; there are pending requests.
(when org-element--cache-sync-requests
(org-element--cache-sync (current-buffer)))
(org-with-base-buffer nil
(when org-element--cache-sync-requests
(org-element--cache-sync (current-buffer))))
;; Call `org-element--parse-to' directly avoiding any
;; kind of `org-element-at-point' overheads.
(if restrict-elements
@ -7515,8 +7518,9 @@ the cache."
tmpnext-start))
;; Check if cache does not have gaps.
(cache-gapless-p
() `(eq org-element--cache-change-tic
(alist-get granularity org-element--cache-gapless))))
() `(org-with-base-buffer nil
(eq org-element--cache-change-tic
(alist-get granularity org-element--cache-gapless)))))
;; The core algorithm is simple walk along binary tree. However,
;; instead of checking all the tree elements from first to last
;; (like in `avl-tree-mapcar'), we begin from FROM-POS skipping
@ -7644,7 +7648,9 @@ the cache."
;; In the process, we may alter the buffer,
;; so also keep track of the cache state.
(progn
(setq modified-tic org-element--cache-change-tic)
(setq modified-tic
(org-with-base-buffer nil
org-element--cache-change-tic))
(setq cache-size (cache-size))
;; When NEXT-RE/FAIL-RE is provided, skip to
;; next regexp match after :begin of the current
@ -7678,7 +7684,7 @@ the cache."
;;
;; Call FUNC. FUNC may move point.
(setq org-element-cache-map-continue-from nil)
(if org-element--cache-map-statistics
(if (org-with-base-buffer nil org-element--cache-map-statistics)
(progn
(setq before-time (float-time))
(push (funcall func data) result)
@ -7697,7 +7703,15 @@ the cache."
(when org-element-cache-map-continue-from
(goto-char org-element-cache-map-continue-from))
(when (> (point) start)
(move-start-to-next-match nil))
(move-start-to-next-match nil)
;; (point) inside matching element.
;; Go further.
(when (> (point) start)
(setq data (element-match-at-point))
(if (not data)
(cache-walk-abort)
(goto-char (next-element-start))
(move-start-to-next-match next-element-re))))
;; Drop nil.
(unless (car result) (pop result)))
;; If FUNC did not move the point and we
@ -7710,8 +7724,9 @@ the cache."
start))
(setq start nil))
;; Check if the buffer has been modified.
(unless (and (eq modified-tic org-element--cache-change-tic)
(eq cache-size (cache-size)))
(unless (org-with-base-buffer nil
(and (eq modified-tic org-element--cache-change-tic)
(eq cache-size (cache-size))))
;; START may no longer be valid, update
;; it to beginning of real element.
;; Upon modification, START may lay

View file

@ -853,7 +853,7 @@ to `org-footnote-section'. Inline definitions are ignored."
;; Insert un-referenced footnote definitions at the end.
;; Combine all insertions into one to create a single cache
;; update call.
(combine-change-calls (point) (point)
(org-combine-change-calls (point) (point)
(pcase-dolist (`(,label . ,definition) definitions)
(unless (member label inserted)
(insert "\n" definition "\n"))))))))))

View file

@ -11,7 +11,7 @@ Inserted by installing Org mode or when a release is made."
(defun org-git-version ()
"The Git version of Org mode.
Inserted by installing Org or when a release is made."
(let ((org-git-version "release_9.6.1-23-gc45a05"))
(let ((org-git-version "release_9.6.1-31-gaf1bb1"))
org-git-version))
(provide 'org-version)

View file

@ -723,6 +723,10 @@ defined in org-duration.el.")
(set-default-toplevel-value var value)
(when (featurep 'org)
(org-load-modules-maybe 'force)
;; FIXME: We can't have all the requires at top-level due to
;; circular dependencies. Yet, this function might sometimes be
;; called when 'org-element is not loaded.
(require 'org-element)
(org-element-cache-reset 'all)))
(defcustom org-modules '(ol-doi ol-w3m ol-bbdb ol-bibtex ol-docview ol-gnus ol-info ol-irc ol-mhe ol-rmail ol-eww)
@ -6556,7 +6560,7 @@ See also `org-promote'."
(interactive)
(save-excursion
(org-back-to-heading t)
(combine-change-calls (point) (save-excursion (org-end-of-subtree t))
(org-combine-change-calls (point) (save-excursion (org-end-of-subtree t))
(org-with-limited-levels (org-map-tree 'org-promote))))
(org-fix-position-after-promote))
@ -6566,7 +6570,7 @@ See `org-demote' and `org-promote'."
(interactive)
(save-excursion
(org-back-to-heading t)
(combine-change-calls (point) (save-excursion (org-end-of-subtree t))
(org-combine-change-calls (point) (save-excursion (org-end-of-subtree t))
(org-with-limited-levels (org-map-tree 'org-demote))))
(org-fix-position-after-promote))
@ -7135,7 +7139,7 @@ When REMOVE is non-nil, remove the subtree from the clipboard."
(setq beg (point))
;; Avoid re-parsing cache elements when i.e. level 1 heading
;; is inserted and then promoted.
(combine-change-calls beg beg
(org-combine-change-calls beg beg
(when (fboundp 'org-id-paste-tracker) (org-id-paste-tracker txt))
(insert txt)
(unless (string-suffix-p "\n" txt) (insert "\n"))
@ -18844,7 +18848,7 @@ Alignment is done according to `org-property-format', which see."
(when (save-excursion
(beginning-of-line)
(looking-at org-property-re))
(combine-change-calls (match-beginning 0) (match-end 0)
(org-combine-change-calls (match-beginning 0) (match-end 0)
(let ((newtext (concat (match-string 4)
(org-trim
(format org-property-format (match-string 1) (match-string 3))))))

View file

@ -272,6 +272,11 @@ MODE is either `c' or `cpp'."
;; Indent the body of namespace definitions.
((parent-is "declaration_list") parent-bol c-ts-mode-indent-offset)))
;; Closing bracket. This should be before initializer_list
;; (and probably others) rule because that rule (and other
;; similar rules) will match the closing bracket. (Bug#61398)
((node-is "}") point-min c-ts-common-statement-offset)
;; int[5] a = { 0, 0, 0, 0 };
((parent-is "initializer_list") parent-bol c-ts-mode-indent-offset)
;; Statement in enum.
@ -281,8 +286,6 @@ MODE is either `c' or `cpp'."
;; Statement in {} blocks.
((parent-is "compound_statement") point-min c-ts-common-statement-offset)
;; Closing bracket.
((node-is "}") point-min c-ts-common-statement-offset)
;; Opening bracket.
((node-is "compound_statement") point-min c-ts-common-statement-offset)
;; Bug#61291.
@ -799,7 +802,9 @@ the semicolon. This function skips the semicolon."
(setq-local c-ts-common-indent-type-regexp-alist
`((block . ,(rx (or "compound_statement"
"field_declaration_list"
"enumerator_list")))
"enumerator_list"
"initializer_list"
"field_declaration_list")))
(if . "if_statement")
(else . ("if_statement" . "alternative"))
(do . "do_statement")

View file

@ -314,6 +314,7 @@ Return nil if there is no name or if NODE is not a defun node."
"constructor_body"
"annotation_type_body"
"interface_body"
"lambda_expression"
"enum_body"
"switch_block"
"record_declaration_body"

View file

@ -1609,7 +1609,8 @@ please check its value")
;; or EMACSLOADPATH, so we basically always have to check.
(let (warned)
(dolist (dir load-path)
(and (not warned)
(and (not noninteractive)
(not warned)
(stringp dir)
(string-equal (file-name-as-directory (expand-file-name dir))
(expand-file-name user-emacs-directory))

View file

@ -318,7 +318,9 @@ window system by evaluating the following on startup to set this variable:
;;;###autoload
(defcustom ispell-personal-dictionary nil
"File name of your personal spelling dictionary, or nil.
If nil, the default personal dictionary for your spelling checker is used."
If nil, the default personal dictionary for your spelling checker is used.
Due to a misfeature of Hunspell, if the value is an absolute file name, the
file by that name must already exist for Hunspell to be able to use it."
:type '(choice file
(const :tag "default" nil)))
@ -1730,7 +1732,10 @@ If you specify a personal dictionary for the current buffer which is
different from the current personal dictionary, the effect is similar
to calling \\[ispell-change-dictionary]. This variable is automatically
set when defined in the file with either `ispell-pdict-keyword' or the
local variable syntax.")
local variable syntax.
Due to a misfeature of Hunspell, if the value is an absolute file name, the
file by that name must already exist for Hunspell to be able to use it.")
;;;###autoload(put 'ispell-local-pdict 'safe-local-variable 'stringp)

View file

@ -926,7 +926,7 @@ Print the contents of $ as an Emacs Lisp cons.
end
define nextcons
p $.u.cdr
p $.u.s.u.cdr
xcons
end
document nextcons

View file

@ -4991,7 +4991,8 @@ DEFUN ("comp--compile-ctxt-to-file", Fcomp__compile_ctxt_to_file,
format_string ("%s_libgccjit_repro.c", SSDATA (ebase_name)));
Lisp_Object tmp_file =
Fmake_temp_file_internal (base_name, Qnil, build_string (".eln.tmp"), Qnil);
Fmake_temp_file_internal (base_name, make_fixnum (0),
build_string (".eln.tmp"), Qnil);
Lisp_Object encoded_tmp_file = ENCODE_FILE (tmp_file);
#ifdef WINDOWSNT
encoded_tmp_file = ansi_encode_filename (encoded_tmp_file);

View file

@ -3979,8 +3979,6 @@ by calling `format-decode', which see. */)
struct timespec mtime;
int fd;
ptrdiff_t inserted = 0;
ptrdiff_t how_much;
off_t beg_offset, end_offset;
int unprocessed;
specpdl_ref count = SPECPDL_INDEX ();
Lisp_Object handler, val, insval, orig_filename, old_undo;
@ -3993,7 +3991,8 @@ by calling `format-decode', which see. */)
bool replace_handled = false;
bool set_coding_system = false;
Lisp_Object coding_system;
bool read_quit = false;
/* Negative if read error, 0 if OK so far, positive if quit. */
ptrdiff_t read_quit = 0;
/* If the undo log only contains the insertion, there's no point
keeping it. It's typically when we first fill a file-buffer. */
bool empty_undo_list_p
@ -4042,6 +4041,17 @@ by calling `format-decode', which see. */)
goto handled;
}
if (!NILP (visit))
{
if (!NILP (beg) || !NILP (end))
error ("Attempt to visit less than an entire file");
if (BEG < Z && NILP (replace))
error ("Cannot do file visiting in a non-empty buffer");
}
off_t beg_offset = !NILP (beg) ? file_offset (beg) : 0;
off_t end_offset = !NILP (end) ? file_offset (end) : -1;
orig_filename = filename;
filename = ENCODE_FILE (filename);
@ -4084,7 +4094,6 @@ by calling `format-decode', which see. */)
if (!S_ISREG (st.st_mode))
{
regular = false;
seekable = lseek (fd, 0, SEEK_CUR) < 0;
if (! NILP (visit))
{
@ -4092,32 +4101,18 @@ by calling `format-decode', which see. */)
goto notfound;
}
if (!NILP (replace))
xsignal2 (Qfile_error,
build_string ("not a regular file"), orig_filename);
seekable = lseek (fd, 0, SEEK_CUR) < 0;
if (!NILP (beg) && !seekable)
xsignal2 (Qfile_error,
build_string ("cannot use a start position in a non-seekable file/device"),
orig_filename);
if (!NILP (replace))
xsignal2 (Qfile_error,
build_string ("not a regular file"), orig_filename);
}
if (!NILP (visit))
{
if (!NILP (beg) || !NILP (end))
error ("Attempt to visit less than an entire file");
if (BEG < Z && NILP (replace))
error ("Cannot do file visiting in a non-empty buffer");
}
if (!NILP (beg))
beg_offset = file_offset (beg);
else
beg_offset = 0;
if (!NILP (end))
end_offset = file_offset (end);
else
if (end_offset < 0)
{
if (!regular)
end_offset = TYPE_MAXIMUM (off_t);
@ -4178,7 +4173,7 @@ by calling `format-decode', which see. */)
else
{
/* Don't try looking inside a file for a coding system
specification if it is not seekable. */
specification if it is not a regular file. */
if (regular && !NILP (Vset_auto_coding_function))
{
/* Find a coding system specified in the heading two
@ -4196,7 +4191,7 @@ by calling `format-decode', which see. */)
if (nread == 1024)
{
int ntail;
if (lseek (fd, - (1024 * 3), SEEK_END) < 0)
if (lseek (fd, st.st_size - 1024 * 3, SEEK_CUR) < 0)
report_file_error ("Setting file position",
orig_filename);
ntail = emacs_read_quit (fd, read_buf + nread, 1024 * 3);
@ -4481,7 +4476,7 @@ by calling `format-decode', which see. */)
ptrdiff_t bufpos;
unsigned char *decoded;
ptrdiff_t temp;
ptrdiff_t this = 0;
ptrdiff_t this;
specpdl_ref this_count = SPECPDL_INDEX ();
bool multibyte
= ! NILP (BVAR (current_buffer, enable_multibyte_characters));
@ -4657,8 +4652,12 @@ by calling `format-decode', which see. */)
}
move_gap_both (PT, PT_BYTE);
if (GAP_SIZE < total)
make_gap (total - GAP_SIZE);
/* Ensure the gap is at least one byte larger than needed for the
estimated file size, so that in the usual case we read to EOF
without reallocating. */
if (GAP_SIZE <= total)
make_gap (total - GAP_SIZE + 1);
if (beg_offset != 0 || !NILP (replace))
{
@ -4666,12 +4665,6 @@ by calling `format-decode', which see. */)
report_file_error ("Setting file position", orig_filename);
}
/* In the following loop, HOW_MUCH contains the total bytes read so
far for a regular file, and not changed for a special file. But,
before exiting the loop, it is set to a negative value if I/O
error occurs. */
how_much = 0;
/* Total bytes inserted. */
inserted = 0;
@ -4680,23 +4673,26 @@ by calling `format-decode', which see. */)
{
ptrdiff_t gap_size = GAP_SIZE;
while (how_much < total)
while (NILP (end) || inserted < total)
{
/* `try' is reserved in some compilers (Microsoft C). */
ptrdiff_t trytry = min (total - how_much, READ_BUF_SIZE);
ptrdiff_t this;
if (gap_size == 0)
{
/* The size estimate was wrong. Make the gap 50% larger. */
make_gap (GAP_SIZE >> 1);
gap_size = GAP_SIZE - inserted;
}
/* 'try' is reserved in some compilers (Microsoft C). */
ptrdiff_t trytry = min (gap_size, READ_BUF_SIZE);
if (!NILP (end))
trytry = min (trytry, total - inserted);
if (!seekable && NILP (end))
{
Lisp_Object nbytes;
/* Maybe make more room. */
if (gap_size < trytry)
{
make_gap (trytry - gap_size);
gap_size = GAP_SIZE - inserted;
}
/* Read from the file, capturing `quit'. When an
error occurs, end the loop, and arrange for a quit
to be signaled after decoding the text we read. */
@ -4707,7 +4703,7 @@ by calling `format-decode', which see. */)
if (NILP (nbytes))
{
read_quit = true;
read_quit = 1;
break;
}
@ -4726,19 +4722,11 @@ by calling `format-decode', which see. */)
if (this <= 0)
{
how_much = this;
read_quit = this;
break;
}
gap_size -= this;
/* For a regular file, where TOTAL is the real size,
count HOW_MUCH to compare with it.
For a special file, where TOTAL is just a buffer size,
so don't bother counting in HOW_MUCH.
(INSERTED is where we count the number of characters inserted.) */
if (seekable || !NILP (end))
how_much += this;
inserted += this;
}
}
@ -4759,7 +4747,7 @@ by calling `format-decode', which see. */)
emacs_close (fd);
clear_unwind_protect (fd_index);
if (how_much < 0)
if (read_quit < 0)
report_file_error ("Read error", orig_filename);
notfound:

View file

@ -2748,7 +2748,7 @@ dump_hash_table (struct dump_context *ctx,
static dump_off
dump_buffer (struct dump_context *ctx, const struct buffer *in_buffer)
{
#if CHECK_STRUCTS && !defined HASH_buffer_DB34E5D09F
#if CHECK_STRUCTS && !defined HASH_buffer_85D317CE74
# error "buffer changed. See CHECK_STRUCTS comment in config.h."
#endif
struct buffer munged_buffer = *in_buffer;

View file

@ -4638,7 +4638,6 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
;; This test is inspired by Bug#51386, Bug#52758, Bug#53513, Bug#54042
;; and Bug#60505.
;; TODO: Add tests for user names and multi-hop file names.
(ert-deftest tramp-test26-interactive-file-name-completion ()
"Check interactive completion with different `completion-styles'."
(tramp-cleanup-connection tramp-test-vec nil 'keep-password)
@ -4649,12 +4648,15 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
(let ((method (file-remote-p ert-remote-temporary-file-directory 'method))
(user (file-remote-p ert-remote-temporary-file-directory 'user))
(host (file-remote-p ert-remote-temporary-file-directory 'host))
(hop (file-remote-p ert-remote-temporary-file-directory 'hop))
(orig-syntax tramp-syntax)
(non-essential t)
(inhibit-message t))
(when (and (stringp host) (string-match tramp-host-with-port-regexp host))
(setq host (match-string 1 host)))
;; (trace-function #'tramp-completion-file-name-handler)
;; (trace-function #'completion-file-name-table)
(unwind-protect
(dolist (syntax (if (tramp--test-expensive-test-p)
(tramp-syntax-values) `(,orig-syntax)))
@ -4689,25 +4691,29 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
(ipv6-postfix
(and (string-match-p tramp-ipv6-regexp host)
tramp-postfix-ipv6-format))
;; The hop string fits only the initial syntax.
(hop (and (eq tramp-syntax orig-syntax) hop))
test result completions)
(dolist
(test-and-result
;; These are triples (TEST-STRING SINGLE-RESULT
;; COMPLETION-RESULT).
;; These are triples (TEST-STRING RESULT-CHECK
;; COMPLETION-CHECK).
(append
;; Complete method name.
(unless (string-empty-p tramp-method-regexp)
`((,(concat
tramp-prefix-format
(substring-no-properties method 0 2))
tramp-prefix-format hop
(substring-no-properties
method 0 (min 2 (length method))))
,(concat tramp-prefix-format method-string)
,method-string)))
;; Complete user name.
(unless (tramp-string-empty-or-nil-p user)
`((,(concat
tramp-prefix-format method-string
(substring-no-properties user 0 2))
tramp-prefix-format hop method-string
(substring-no-properties
user 0 (min 2 (length user))))
,(concat
tramp-prefix-format method-string
user tramp-postfix-user-format)
@ -4716,8 +4722,10 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
;; Complete host name.
(unless (tramp-string-empty-or-nil-p host)
`((,(concat
tramp-prefix-format method-string
ipv6-prefix (substring-no-properties host 0 2))
tramp-prefix-format hop method-string
ipv6-prefix
(substring-no-properties
host 0 (min 2 (length host))))
,(concat
tramp-prefix-format method-string
ipv6-prefix host
@ -4729,9 +4737,11 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
(unless (or (tramp-string-empty-or-nil-p user)
(tramp-string-empty-or-nil-p host))
`((,(concat
tramp-prefix-format method-string
tramp-prefix-format hop method-string
user tramp-postfix-user-format
ipv6-prefix (substring-no-properties host 0 2))
ipv6-prefix
(substring-no-properties
host 0 (min 2 (length host))))
,(concat
tramp-prefix-format method-string
user tramp-postfix-user-format
@ -4742,12 +4752,14 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
ipv6-postfix tramp-postfix-host-format))))))
(ignore-errors (kill-buffer "*Completions*"))
;; (and (bufferp trace-buffer) (kill-buffer trace-buffer))
(discard-input)
(setq test (car test-and-result)
unread-command-events
(mapcar #'identity (concat test "\t\t\n"))
completions nil
result (read-file-name "Prompt: "))
(if (not (get-buffer "*Completions*"))
(progn
;; (tramp--test-message
@ -4776,6 +4788,9 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
(should (member (caddr test-and-result) completions)))))))
;; Cleanup.
;; (tramp--test-message "%s" (tramp-get-buffer-string trace-buffer))
;; (untrace-function #'tramp-completion-file-name-handler)
;; (untrace-function #'completion-file-name-table)
(tramp-change-syntax orig-syntax)))))
(ert-deftest tramp-test27-load ()
@ -5527,7 +5542,7 @@ If UNSTABLE is non-nil, the test is tagged as `:unstable'."
;; (tramp--test-message "%s" attributes)
(should (equal (cdr (assq 'comm attributes)) (car command)))
(should (equal (cdr (assq 'args attributes))
(mapconcat #'identity command " ")))))
(string-join command " ")))))
;; Cleanup.
(ignore-errors (delete-process proc)))))
@ -6088,8 +6103,7 @@ INPUT, if non-nil, is a string sent to the process."
;; We make a super long `tramp-remote-path'.
(make-directory tmp-name)
(should (file-directory-p tmp-name))
(while (tramp-compat-length<
(mapconcat #'identity orig-exec-path ":") 5000)
(while (tramp-compat-length< (string-join orig-exec-path ":") 5000)
(let ((dir (make-temp-file (file-name-as-directory tmp-name) 'dir)))
(should (file-directory-p dir))
(setq tramp-remote-path
@ -6111,8 +6125,7 @@ INPUT, if non-nil, is a string sent to the process."
tramp-test-vec "pipe-buf" 4096))
;; The last element of `exec-path' is `exec-directory'.
(should
(string-equal
path (mapconcat #'identity (butlast orig-exec-path) ":"))))
(string-equal path (string-join (butlast orig-exec-path) ":"))))
;; The shell "sh" shall always exist.
(should (executable-find "sh" 'remote)))
@ -7167,7 +7180,7 @@ This requires restrictions of file name syntax."
;; Simplify test in order to speed up.
(apply #'tramp--test-check-files
(if (tramp--test-expensive-test-p)
files (list (mapconcat #'identity files ""))))))
files (list (string-join files ""))))))
(tramp--test-deftest-with-stat tramp-test41-special-characters)

View file

@ -182,6 +182,20 @@ else if (false)
return 3;
=-=-=
Name: Initializer List (Bug#61398)
=-=
int main()
{
const char *emoticons[][2] =
{
{":-)", "SLIGHTLY SMILING FACE"},
{";-)", "WINKING FACE"},
{":-(", "SLIGHTLY FROWNING FACE"},
};
}
=-=-=
Name: Multiline Block Comments 1 (bug#60270)
=-=
@ -327,3 +341,16 @@ void foo(
}
}
=-=-=
Name: Initializer List (Linux Style) (Bug#61398)
=-=
int main()
{
const char *emoticons[][2] = {
{":-)", "SLIGHTLY SMILING FACE"},
{";-)", "WINKING FACE"},
{":-(", "SLIGHTLY FROWNING FACE"},
};
}
=-=-=