emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 1766609309 1/3: Merge from origin/emacs-28


From: Stefan Kangas
Subject: master 1766609309 1/3: Merge from origin/emacs-28
Date: Fri, 10 Jun 2022 02:40:28 -0400 (EDT)

branch: master
commit 17666093097d58466e9581b9ff1d07ec5e3eeebf
Merge: 8ac23bf0f6 d02c94090c
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    Merge from origin/emacs-28
    
    d02c94090c Fix error reporting in process-async-https-with-delay
    9a4862a973 * doc/misc/org.org: Remove spurious markup.
    768ed1476a Make Tramp version check more robust
    7f778c6943 Fix debugging with GDB when a breakpoint has multiple loca...
    25e53e9391 ; * lisp/files.el (file-expand-wildcards): Doc fix.
    3ea9357d10 Update documentation of 'aset' and 'store-substring'
    
    # Conflicts:
    #       lisp/files.el
---
 doc/lispref/strings.texi  | 32 +++++++++++--------
 doc/misc/org.org          |  2 +-
 lisp/files.el             | 13 ++++----
 lisp/net/trampver.el      |  2 ++
 lisp/progmodes/gdb-mi.el  | 78 ++++++++++++++++++++++++++++-------------------
 test/src/process-tests.el |  2 +-
 6 files changed, 77 insertions(+), 52 deletions(-)

diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi
index 78f1344cad..addf195fad 100644
--- a/doc/lispref/strings.texi
+++ b/doc/lispref/strings.texi
@@ -464,23 +464,29 @@ Remove the final newline, if any, from @var{string}.
 described in this section.  @xref{Mutability}.
 
   The most basic way to alter the contents of an existing string is with
-@code{aset} (@pxref{Array Functions}).  @code{(aset @var{string}
-@var{idx} @var{char})} stores @var{char} into @var{string} at index
-@var{idx}.  Each character occupies one or more bytes, and if @var{char}
-needs a different number of bytes from the character already present at
-that index, @code{aset} signals an error.
+@code{aset} (@pxref{Array Functions}).  @w{@code{(aset @var{string}
+@var{idx} @var{char})}} stores @var{char} into @var{string} at character
+index @var{idx}.  It will automatically convert a pure-@acronym{ASCII}
+@var{string} to a multibyte string (@pxref{Text Representations}) if
+needed, but we recommend to always make sure @var{string} is multibyte
+(e.g., by using @code{string-to-multibyte}, @pxref{Converting
+Representations}), if @var{char} is a non-@acronym{ASCII} character, not
+a raw byte.
 
   A more powerful function is @code{store-substring}:
 
 @defun store-substring string idx obj
-This function alters part of the contents of the string @var{string}, by
-storing @var{obj} starting at index @var{idx}.  The argument @var{obj}
-may be either a character or a (smaller) string.
-
-Since it is impossible to change the length of an existing string, it is
-an error if @var{obj} doesn't fit within @var{string}'s actual length,
-or if any new character requires a different number of bytes from the
-character currently present at that point in @var{string}.
+This function alters part of the contents of the specified @var{string},
+by storing @var{obj} starting at character index @var{idx}.  The
+argument @var{obj} may be either a character (in which case the function
+behaves exactly as @code{aset}) or a (smaller) string.  If @var{obj}
+is a multibyte string, we recommend to make sure @var{string} is also
+multibyte, even if it's pure-@acronym{ASCII}.
+
+Since it is impossible to change the number of characters in an
+existing string, it is en error if @var{obj} consists of more
+characters than would fit in @var{string} starting at character index
+@var{idx}.
 @end defun
 
   To clear out a string that contained a password, use
diff --git a/doc/misc/org.org b/doc/misc/org.org
index 3dce83c936..baab2efeda 100644
--- a/doc/misc/org.org
+++ b/doc/misc/org.org
@@ -12442,7 +12442,7 @@ should in principle be exportable as a Beamer 
presentation.
   When =ignoreheading= is set, Org export ignores the entry's headline
   but not its content.  This is useful for inserting content between
   frames.  It is also useful for properly closing a =column=
-  environment.  @end itemize
+  environment.
 
   #+cindex: @samp{BEAMER_ACT}, property
   #+cindex: @samp{BEAMER_OPT}, property
diff --git a/lisp/files.el b/lisp/files.el
index a505f62af8..5f4c4fa017 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -7224,8 +7224,9 @@ by `sh' are supported."
   :group 'dired)
 
 (defun file-expand-wildcards (pattern &optional full regexp)
-  "Expand wildcard pattern PATTERN.
-This returns a list of file names that match the pattern.
+  "Expand (a.k.a. \"glob\") file-name wildcard pattern PATTERN.
+This returns a list of file names that match PATTERN.
+The returned list of file names is sorted in the `string<' order.
 
 PATTERN is, by default, a \"glob\"/wildcard string, e.g.,
 \"/tmp/*.png\" or \"/*/*/foo.png\", but can also be a regular
@@ -7234,13 +7235,13 @@ case, the matches are applied per sub-directory, so a 
match can't
 span a parent/sub directory, which means that a regexp bit can't
 contain the \"/\" character.
 
-The list of files returned are sorted in `string<' order.
+The returned list of file names is sorted in the `string<' order.
 
-If PATTERN is written as an absolute file name, the values are
-absolute also.
+If PATTERN is written as an absolute file name, the expansions in
+the returned list are also absolute.
 
 If PATTERN is written as a relative file name, it is interpreted
-relative to the current default directory, `default-directory'.
+relative to the current `default-directory'.
 The file names returned are normally also relative to the current
 default directory.  However, if FULL is non-nil, they are absolute."
   (save-match-data
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el
index e3bcd568d7..9a2f495eb8 100644
--- a/lisp/net/trampver.el
+++ b/lisp/net/trampver.el
@@ -58,6 +58,7 @@
       ;; `emacs-repository-get-branch' has been introduced with Emacs 27.1.
       (with-no-warnings
        (and (stringp dir) (file-directory-p dir)
+            (executable-find "git")
             (emacs-repository-get-branch dir)))))
   "The repository branch of the Tramp sources.")
 
@@ -70,6 +71,7 @@
          (dir (or (locate-dominating-file (locate-library "tramp") ".git")
                   source-directory)))
       (and (stringp dir) (file-directory-p dir)
+          (executable-find "git")
           (emacs-repository-get-version dir))))
   "The repository revision of the Tramp sources.")
 
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index 2319e63854..79ef6101e9 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -3087,6 +3087,45 @@ See `def-gdb-auto-update-handler'."
  'gdb-breakpoints-mode
  'gdb-invalidate-breakpoints)
 
+(defun gdb-breakpoints--add-breakpoint-row (tbl bkpt)
+  (let ((at (gdb-mi--field bkpt 'at))
+        (pending (gdb-mi--field bkpt 'pending))
+        (addr (gdb-mi--field bkpt 'addr))
+        (func (gdb-mi--field bkpt 'func))
+       (type (gdb-mi--field bkpt 'type)))
+    (if (and (not func) (string-equal addr "<MULTIPLE>"))
+        (setq func ""))
+    (gdb-table-add-row tbl
+                       (list
+                        (gdb-mi--field bkpt 'number)
+                        (or type "")
+                        (or (gdb-mi--field bkpt 'disp) "")
+                        (let ((flag (gdb-mi--field bkpt 'enabled)))
+                          (if (string-equal flag "y")
+                              (eval-when-compile
+                                (propertize "y" 'font-lock-face
+                                            font-lock-warning-face))
+                            (eval-when-compile
+                              (propertize "n" 'font-lock-face
+                                          font-lock-comment-face))))
+                        addr
+                        (or (gdb-mi--field bkpt 'times) "")
+                        (if (and type (string-match ".*watchpoint" type))
+                            (gdb-mi--field bkpt 'what)
+                          (or (and (equal func "") "")
+                              pending at
+                              (concat "in "
+                                      (propertize (or func "unknown")
+                                                  'font-lock-face
+                                                  font-lock-function-name-face)
+                                      (gdb-frame-location bkpt)))))
+                       ;; Add clickable properties only for
+                       ;; breakpoints with file:line information
+                       (append (list 'gdb-breakpoint bkpt)
+                               (when func
+                                 '(help-echo "mouse-2, RET: visit breakpoint"
+                                             mouse-face highlight))))))
+
 (defun gdb-breakpoints-list-handler-custom ()
   (let ((breakpoints-list (gdb-mi--field
                            (gdb-mi--field (gdb-mi--partial-output 'bkpt)
@@ -3099,37 +3138,14 @@ See `def-gdb-auto-update-handler'."
       (add-to-list 'gdb-breakpoints-list
                    (cons (gdb-mi--field breakpoint 'number)
                          breakpoint))
-      (let ((at (gdb-mi--field breakpoint 'at))
-            (pending (gdb-mi--field breakpoint 'pending))
-            (func (gdb-mi--field breakpoint 'func))
-           (type (gdb-mi--field breakpoint 'type)))
-        (gdb-table-add-row table
-                           (list
-                            (gdb-mi--field breakpoint 'number)
-                            (or type "")
-                            (or (gdb-mi--field breakpoint 'disp) "")
-                            (let ((flag (gdb-mi--field breakpoint 'enabled)))
-                              (if (string-equal flag "y")
-                                  (eval-when-compile
-                                    (propertize "y" 'font-lock-face
-                                                font-lock-warning-face))
-                                (eval-when-compile
-                                  (propertize "n" 'font-lock-face
-                                              font-lock-comment-face))))
-                            (gdb-mi--field breakpoint 'addr)
-                            (or (gdb-mi--field breakpoint 'times) "")
-                            (if (and type (string-match ".*watchpoint" type))
-                                (gdb-mi--field breakpoint 'what)
-                              (or pending at
-                                  (concat "in "
-                                          (propertize (or func "unknown")
-                                                      'font-lock-face 
font-lock-function-name-face)
-                                          (gdb-frame-location breakpoint)))))
-                           ;; Add clickable properties only for breakpoints 
with file:line
-                           ;; information
-                           (append (list 'gdb-breakpoint breakpoint)
-                                   (when func '(help-echo "mouse-2, RET: visit 
breakpoint"
-                                                mouse-face highlight))))))
+      ;; Add the breakpoint/header row to the table.
+      (gdb-breakpoints--add-breakpoint-row table breakpoint)
+      ;; If this breakpoint has multiple locations, add them as well.
+      (when-let ((locations (gdb-mi--field breakpoint 'locations)))
+        (dolist (loc locations)
+          (add-to-list 'gdb-breakpoints-list
+                       (cons (gdb-mi--field loc 'number) loc))
+          (gdb-breakpoints--add-breakpoint-row table loc))))
     (insert (gdb-table-string table " "))
     (gdb-place-breakpoints)))
 
diff --git a/test/src/process-tests.el b/test/src/process-tests.el
index f5908d3cda..824c6da119 100644
--- a/test/src/process-tests.el
+++ b/test/src/process-tests.el
@@ -931,7 +931,7 @@ Return nil if FILENAME doesn't exist."
                         (< (float-time) (+ t0 limit)))
               (sit-for 0.1)))
           (should status)
-          (should-not (assq :error status))
+          (should-not (plist-get status ':error))
           (should buf)
           (should (> (buffer-size buf) 0))
           )



reply via email to

[Prev in Thread] Current Thread [Next in Thread]