emacs-diffs
[Top][All Lists]
Advanced

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

feature/pgtk 81d2e84: Merge remote-tracking branch 'origin/master' into


From: Po Lu
Subject: feature/pgtk 81d2e84: Merge remote-tracking branch 'origin/master' into feature/pgtk
Date: Wed, 15 Dec 2021 05:39:15 -0500 (EST)

branch: feature/pgtk
commit 81d2e846a801a45befe911146469a983af8438c6
Merge: 30ac6fb 92ed2fe
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Merge remote-tracking branch 'origin/master' into feature/pgtk
---
 doc/misc/ert.texi                             | 27 +++++++++++++++---
 etc/NEWS.28                                   | 28 +++++++++----------
 lisp/allout.el                                | 13 +++------
 lisp/arc-mode.el                              |  8 ++----
 lisp/emacs-lisp/eieio-compat.el               |  1 +
 lisp/net/eudc.el                              |  7 -----
 lisp/net/tramp.el                             | 11 +++++---
 lisp/{emacs-lisp => obsolete}/eieio-compat.el |  0
 lisp/obsolete/iswitchb.el                     |  4 +--
 lisp/pixel-scroll.el                          |  3 +-
 lisp/progmodes/cperl-mode.el                  | 12 ++------
 lisp/progmodes/elisp-mode.el                  | 40 ++++++++++++---------------
 lisp/progmodes/project.el                     | 10 ++++---
 src/charset.c                                 |  2 +-
 src/charset.h                                 |  1 +
 src/pdumper.c                                 |  4 +--
 src/xterm.c                                   |  5 +++-
 17 files changed, 88 insertions(+), 88 deletions(-)

diff --git a/doc/misc/ert.texi b/doc/misc/ert.texi
index af21548..71c423a 100644
--- a/doc/misc/ert.texi
+++ b/doc/misc/ert.texi
@@ -109,6 +109,7 @@ Appendix
 @end menu
 @end ifnottex
 
+
 @node Introduction
 @chapter Introduction
 @cindex introduction to ERT
@@ -123,7 +124,7 @@ commands to run them to verify whether the definitions that 
are
 currently loaded in Emacs pass the tests.
 
 Some Lisp files have comments like the following (adapted from the
-package @code{pp.el}):
+package @file{pp.el}):
 
 @lisp
 ;; (pp-to-string '(quote quote))          ; expected: "'quote"
@@ -358,6 +359,7 @@ Prompt for a test and then show its documentation.
 
 @end table
 
+
 @node Running Tests in Batch Mode
 @section Running Tests in Batch Mode
 @cindex running tests in batch mode
@@ -375,7 +377,7 @@ emacs -batch -l ert -l my-tests.el -f 
ert-run-tests-batch-and-exit
 @end example
 
 This command will start up Emacs in batch mode, load ERT, load
-@code{my-tests.el}, and run all tests defined in it.  It will exit
+@file{my-tests.el}, and run all tests defined in it.  It will exit
 with a zero exit status if all tests passed, or nonzero if any tests
 failed or if anything else went wrong.  It will also print progress
 messages and error diagnostics to standard output.
@@ -439,10 +441,21 @@ emacs -batch -l ert -l my-tests.el \
       -eval '(ert-run-tests-batch-and-exit "to-match")'
 @end example
 
+@vindex EMACS_TEST_VERBOSE@r{, environment variable}
 By default, ERT test failure summaries are quite brief in batch
 mode---only the names of the failed tests are listed.  If the
-EMACS_TEST_VERBOSE environment variable is set, the failure summaries
-will also include the data from the failing test.
+@env{EMACS_TEST_VERBOSE} environment variable is set, the failure
+summaries will also include the data from the failing test.
+
+@vindex EMACS_TEST_JUNIT_REPORT@r{, environment variable}
+ERT can produce JUnit test reports in batch mode.  If the environment
+variable @env{EMACS_TEST_JUNIT_REPORT} is set, ERT will produce for
+every test package @file{my-tests.el} a corresponding JUnit test
+report @file{my-tests.xml}.  The function
+@code{ert-summarize-tests-batch-and-exit} collects all these package
+test reports into a new JUnit test report, with the respective name of
+that environment variable.
+
 
 @node Test Selectors
 @section Test Selectors
@@ -514,6 +527,7 @@ to find where a test was defined if the test was loaded 
from a file.
 * erts files::                  Files containing many buffer tests.
 @end menu
 
+
 @node The @code{should} Macro
 @section The @code{should} Macro
 
@@ -793,6 +807,7 @@ code is to restructure the code slightly to provide better 
interfaces
 for testing.  Usually, this makes the interfaces easier to use as
 well.
 
+
 @node erts files
 @section erts files
 
@@ -907,6 +922,7 @@ non-@code{nil} value, the test will be skipped.
 If you need to use the literal line single line @samp{=-=} in a test
 section, you can quote it with a @samp{\} character.
 
+
 @node How to Debug Tests
 @chapter How to Debug Tests
 
@@ -1108,6 +1124,7 @@ For information on mocks, stubs, fixtures, or test 
suites, see below.
 * Fixtures and Test Suites::  How ERT differs from tools for other languages.
 @end menu
 
+
 @node Mocks and Stubs
 @section Other Tools for Emacs Lisp
 @cindex mocks and stubs
@@ -1182,11 +1199,13 @@ e.g., to run quick tests during interactive development 
and slow tests less
 often.  This can be achieved with the @code{:tag} argument to
 @code{ert-deftest} and @code{tag} test selectors.
 
+
 @node Index
 @unnumbered Index
 
 @printindex cp
 
+
 @node GNU Free Documentation License
 @appendix GNU Free Documentation License
 @include doclicense.texi
diff --git a/etc/NEWS.28 b/etc/NEWS.28
index d2565e5..e7d7215 100644
--- a/etc/NEWS.28
+++ b/etc/NEWS.28
@@ -1011,20 +1011,6 @@ file:
 
     (add-hook 'foo-mode-hook (lambda () (auto-fill-mode -1))
 
-** Xref migrated from EIEIO to cl-defstruct for its core objects.
-This means that 'oref' and 'with-slots' no longer works on them, and
-'make-instance' can no longer be used to create those instances (which
-wasn't recommended anyway).  Packages should restrict themselves to
-using functions like 'xref-make', 'xref-make-match',
-'xref-make-*-location', as well as accessor functions
-'xref-item-summary' and 'xref-item-location'.
-
-Among the benefits are better performance (noticeable when there are a
-lot of matches) and improved flexibility: 'xref-match-item' instances
-do not require that 'location' inherits from 'xref-location' anymore
-(that class was removed), so packages can create new location types to
-use with "match items" without adding EIEIO as a dependency.
-
 
 * Editing Changes in Emacs 28.1
 
@@ -3724,6 +3710,20 @@ user option has been renamed to 
'find-library-source-path', and
 ---
 ** The macro 'vc-call' no longer evaluates its second argument twice.
 
+** Xref migrated from EIEIO to cl-defstruct for its core objects.
+This means that 'oref' and 'with-slots' no longer works on them, and
+'make-instance' can no longer be used to create those instances (which
+wasn't recommended anyway).  Packages should restrict themselves to
+using functions like 'xref-make', 'xref-make-match',
+'xref-make-*-location', as well as accessor functions
+'xref-item-summary' and 'xref-item-location'.
+
+Among the benefits are better performance (noticeable when there are a
+lot of matches) and improved flexibility: 'xref-match-item' instances
+do not require that 'location' inherits from 'xref-location' anymore
+(that class was removed), so packages can create new location types to
+use with "match items" without adding EIEIO as a dependency.
+
 
 * Lisp Changes in Emacs 28.1
 
diff --git a/lisp/allout.el b/lisp/allout.el
index 174184f..f684751 100644
--- a/lisp/allout.el
+++ b/lisp/allout.el
@@ -133,15 +133,10 @@ respective `allout-mode' keybinding variables, 
`allout-command-prefix',
     (when (boundp 'allout-unprefixed-keybindings)
       (dolist (entry allout-unprefixed-keybindings)
         (define-key map (car (read-from-string (car entry))) (cadr entry))))
-    (substitute-key-definition #'beginning-of-line #'allout-beginning-of-line
-                               map global-map)
-    (substitute-key-definition #'move-beginning-of-line
-                               #'allout-beginning-of-line
-                               map global-map)
-    (substitute-key-definition #'end-of-line #'allout-end-of-line
-                               map global-map)
-    (substitute-key-definition #'move-end-of-line #'allout-end-of-line
-                               map global-map)
+    (define-key map [remap beginning-of-line]      #'allout-beginning-of-line)
+    (define-key map [remap move-beginning-of-line] #'allout-beginning-of-line)
+    (define-key map [remap end-of-line]            #'allout-end-of-line)
+    (define-key map [remap move-end-of-line]       #'allout-end-of-line)
     (allout-institute-keymap map)))
 ;;;_  > allout-institute-keymap (map)
 (defun allout-institute-keymap (map)
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el
index 5576ae3..1fd1d66 100644
--- a/lisp/arc-mode.el
+++ b/lisp/arc-mode.el
@@ -431,12 +431,8 @@ be added."
     ;; Let mouse-1 follow the link.
     (define-key map [follow-link] 'mouse-face)
 
-    (if (fboundp 'command-remapping)
-        (progn
-          (define-key map [remap advertised-undo] 'archive-undo)
-          (define-key map [remap undo] 'archive-undo))
-      (substitute-key-definition 'advertised-undo 'archive-undo map global-map)
-      (substitute-key-definition 'undo 'archive-undo map global-map))
+    (define-key map [remap advertised-undo] #'archive-undo)
+    (define-key map [remap undo] #'archive-undo)
 
     (define-key map [mouse-2] 'archive-extract)
 
diff --git a/lisp/emacs-lisp/eieio-compat.el b/lisp/emacs-lisp/eieio-compat.el
index 60b0638..a5f3750 100644
--- a/lisp/emacs-lisp/eieio-compat.el
+++ b/lisp/emacs-lisp/eieio-compat.el
@@ -5,6 +5,7 @@
 ;; Author: Eric M. Ludlam <zappo@gnu.org>
 ;; Keywords: OO, lisp
 ;; Package: eieio
+;; Obsolete-Since: 25.1
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/net/eudc.el b/lisp/net/eudc.el
index 14e5c28..62c2913 100644
--- a/lisp/net/eudc.el
+++ b/lisp/net/eudc.el
@@ -46,16 +46,9 @@
 ;;; Code:
 
 (require 'wid-edit)
-
 (require 'cl-lib)
-
-(unless (fboundp 'custom-menu-create)
-  (autoload 'custom-menu-create "cus-edit"))
-
 (require 'eudc-vars)
 
-
-
 ;;{{{      Internal cooking
 
 ;;{{{      Internal variables and compatibility tricks
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 6b05dad..940e25e 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1874,8 +1874,9 @@ version, the function does nothing."
 
 (defsubst tramp-get-buffer-string (&optional buffer)
   "Return contents of BUFFER.
-If BUFFER is not a buffer, return the contents of `current-buffer'."
-  (with-current-buffer (if (bufferp buffer) buffer (current-buffer))
+If BUFFER is not a buffer or a buffer name, return the contents
+of `current-buffer'."
+  (with-current-buffer (or buffer (current-buffer))
     (substring-no-properties (buffer-string))))
 
 (put #'tramp-get-buffer-string 'tramp-suppress-trace t)
@@ -3964,7 +3965,7 @@ Return nil when there is no lockfile."
 
 (defvar tramp-lock-pid nil
   "A random nunber local for every connection.
-Do not set it manually, it is used buffer-local in `tramp-get-lock-pid'")
+Do not set it manually, it is used buffer-local in `tramp-get-lock-pid'.")
 
 (defun tramp-get-lock-pid (file)
   "Determine pid for lockfile of FILE."
@@ -3985,9 +3986,11 @@ Do not set it manually, it is used buffer-local in 
`tramp-get-lock-pid'")
   "Like `file-locked-p' for Tramp files."
   (when-let ((info (tramp-get-lock-file file))
             (match (string-match tramp-lock-file-info-regexp info)))
-    (or (and (string-equal (match-string 1 info) (user-login-name))
+    (or ; Locked by me.
+        (and (string-equal (match-string 1 info) (user-login-name))
             (string-equal (match-string 2 info) (system-name))
             (string-equal (match-string 3 info) (tramp-get-lock-pid file)))
+       ; User name.
        (match-string 1 info))))
 
 (defun tramp-handle-lock-file (file)
diff --git a/lisp/emacs-lisp/eieio-compat.el b/lisp/obsolete/eieio-compat.el
similarity index 100%
copy from lisp/emacs-lisp/eieio-compat.el
copy to lisp/obsolete/eieio-compat.el
diff --git a/lisp/obsolete/iswitchb.el b/lisp/obsolete/iswitchb.el
index 807f548..f1e4414 100644
--- a/lisp/obsolete/iswitchb.el
+++ b/lisp/obsolete/iswitchb.el
@@ -467,9 +467,7 @@ interfere with other minibuffer usage.")
                  (switch-to-buffer-other-window . iswitchb-buffer-other-window)
                  (switch-to-buffer-other-frame . iswitchb-buffer-other-frame)
                  (display-buffer . iswitchb-display-buffer)))
-      (if (fboundp 'command-remapping)
-          (define-key map (vector 'remap (car b)) (cdr b))
-        (substitute-key-definition (car b) (cdr b) map global-map)))
+      (define-key map (vector 'remap (car b)) (cdr b)))
     map)
   "Global keymap for `iswitchb-mode'.")
 
diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el
index 142ebf9..fa0185b 100644
--- a/lisp/pixel-scroll.el
+++ b/lisp/pixel-scroll.el
@@ -417,7 +417,8 @@ window, and the pixel height of that line."
     (set-window-start nil pos0 t)
     (set-window-vscroll nil vscroll0 t)
     (when (and line-height
-               (> (car (posn-x-y (posn-at-point pos0))) 0))
+               (> (car (posn-x-y (posn-at-point pos0)))
+                  (line-number-display-width t)))
       (setq line-height (- line-height
                            (save-excursion
                              (goto-char pos0)
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index a23505a..fe9612a 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -1019,15 +1019,9 @@ Unless KEEP, removes the old indentation."
       (define-key map [(control ?c) (control ?h) ?v]
        ;;(concat (char-to-string help-char) "v") ; does not work
        'cperl-get-help))
-    (substitute-key-definition
-     'indent-sexp 'cperl-indent-exp
-     map global-map)
-    (substitute-key-definition
-     'indent-region 'cperl-indent-region
-     map global-map)
-    (substitute-key-definition
-     'indent-for-comment 'cperl-indent-for-comment
-     map global-map)
+    (define-key map [remap indent-sexp]        #'cperl-indent-exp)
+    (define-key map [remap indent-region]      #'cperl-indent-region)
+    (define-key map [remap indent-for-comment] #'cperl-indent-for-comment)
     map)
   "Keymap used in CPerl mode.")
 
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 7da93a3..efb5df8 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -45,15 +45,13 @@ It has `lisp-mode-abbrev-table' as its parent."
     table)
   "Syntax table used in `emacs-lisp-mode'.")
 
-(defvar emacs-lisp-mode-map
-  (let ((map (make-sparse-keymap)))
-    (set-keymap-parent map lisp-mode-shared-map)
-    (define-key map "\e\t" 'completion-at-point)
-    (define-key map "\e\C-x" 'eval-defun)
-    (define-key map "\e\C-q" 'indent-pp-sexp)
-    map)
-  "Keymap for Emacs Lisp mode.
-All commands in `lisp-mode-shared-map' are inherited by this map.")
+(defvar-keymap emacs-lisp-mode-map
+  :doc "Keymap for Emacs Lisp mode.
+All commands in `lisp-mode-shared-map' are inherited by this map."
+  :parent lisp-mode-shared-map
+  "M-TAB" #'completion-at-point
+  "C-M-x" #'eval-defun
+  "C-M-q" #'indent-pp-sexp)
 
 (easy-menu-define emacs-lisp-mode-menu emacs-lisp-mode-map
   "Menu for Emacs Lisp mode."
@@ -270,10 +268,8 @@ Comments in the form will be lost."
       (setq-local lexical-binding t)
       (add-file-local-variable-prop-line 'lexical-binding t interactive))))
 
-(defvar elisp--dynlex-modeline-map
-  (let ((map (make-sparse-keymap)))
-    (define-key map [mode-line mouse-1] 'elisp-enable-lexical-binding)
-    map))
+(defvar-keymap elisp--dynlex-modeline-map
+  "<mode-line> <mouse-1>" #'elisp-enable-lexical-binding)
 
 ;;;###autoload
 (define-derived-mode emacs-lisp-mode lisp-data-mode
@@ -1200,16 +1196,14 @@ namespace but with lower confidence."
 
 ;;; Elisp Interaction mode
 
-(defvar lisp-interaction-mode-map
-  (let ((map (make-sparse-keymap)))
-    (set-keymap-parent map lisp-mode-shared-map)
-    (define-key map "\e\C-x" 'eval-defun)
-    (define-key map "\e\C-q" 'indent-pp-sexp)
-    (define-key map "\e\t" 'completion-at-point)
-    (define-key map "\n" 'eval-print-last-sexp)
-    map)
-  "Keymap for Lisp Interaction mode.
-All commands in `lisp-mode-shared-map' are inherited by this map.")
+(defvar-keymap lisp-interaction-mode-map
+  :doc "Keymap for Lisp Interaction mode.
+All commands in `lisp-mode-shared-map' are inherited by this map."
+  :parent lisp-mode-shared-map
+  "C-M-x" #'eval-defun
+  "C-M-q" #'indent-pp-sexp
+  "M-TAB" #'completion-at-point
+  "C-j"   #'eval-print-last-sexp)
 
 (easy-menu-define lisp-interaction-mode-menu lisp-interaction-mode-map
   "Menu for Lisp Interaction mode."
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index c2e125a..8fecdbb 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -1173,7 +1173,9 @@ displayed."
          (not (major-mode . help-mode)))
     (derived-mode . compilation-mode)
     (derived-mode . dired-mode)
-    (derived-mode . diff-mode))
+    (derived-mode . diff-mode)
+    (derived-mode . comint-mode)
+    (derived-mode . change-log-mode))
   "List of conditions to kill buffers related to a project.
 This list is used by `project-kill-buffers'.
 Each condition is either:
@@ -1206,9 +1208,9 @@ current project, it will be killed."
                                (const and) sexp)
                          (cons :tag "Disjunction"
                                (const or) sexp)))
-  :version "28.1"
+  :version "29.1"
   :group 'project
-  :package-version '(project . "0.6.0"))
+  :package-version '(project . "0.8.2"))
 
 (defcustom project-kill-buffers-display-buffer-list nil
   "Non-nil to display list of buffers to kill before killing project buffers.
@@ -1216,7 +1218,7 @@ Used by `project-kill-buffers'."
   :type 'boolean
   :version "29.1"
   :group 'project
-  :package-version '(project . "0.8.1")
+  :package-version '(project . "0.8.2")
   :safe #'booleanp)
 
 (defun project--buffer-list (pr)
diff --git a/src/charset.c b/src/charset.c
index 7cd0fa7..670fd48 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -63,7 +63,7 @@ Lisp_Object Vcharset_hash_table;
 /* Table of struct charset.  */
 struct charset *charset_table;
 int charset_table_size;
-static int charset_table_used;
+int charset_table_used;
 
 /* Special charsets corresponding to symbols.  */
 int charset_ascii;
diff --git a/src/charset.h b/src/charset.h
index 97122d8..8c53823 100644
--- a/src/charset.h
+++ b/src/charset.h
@@ -249,6 +249,7 @@ extern Lisp_Object Vcharset_hash_table;
 /* Table of struct charset.  */
 extern struct charset *charset_table;
 extern int charset_table_size;
+extern int charset_table_used;
 
 #define CHARSET_FROM_ID(id) (charset_table + (id))
 
diff --git a/src/pdumper.c b/src/pdumper.c
index c758bc8..8f03684 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -3177,7 +3177,7 @@ dump_charset (struct dump_context *ctx, int cs_i)
   DUMP_FIELD_COPY (&out, cs, hash_index);
   DUMP_FIELD_COPY (&out, cs, dimension);
   memcpy (out.code_space, &cs->code_space, sizeof (cs->code_space));
-  if (cs->code_space_mask)
+  if (cs_i < charset_table_used && cs->code_space_mask)
     dump_field_fixup_later (ctx, &out, cs, &cs->code_space_mask);
   DUMP_FIELD_COPY (&out, cs, code_linear_p);
   DUMP_FIELD_COPY (&out, cs, iso_chars_96);
@@ -3198,7 +3198,7 @@ dump_charset (struct dump_context *ctx, int cs_i)
   memcpy (out.fast_map, &cs->fast_map, sizeof (cs->fast_map));
   DUMP_FIELD_COPY (&out, cs, code_offset);
   dump_off offset = dump_object_finish (ctx, &out, sizeof (out));
-  if (cs->code_space_mask)
+  if (cs_i < charset_table_used && cs->code_space_mask)
     dump_remember_cold_op (ctx, COLD_OP_CHARSET,
                            Fcons (dump_off_to_lisp (cs_i),
                                   dump_off_to_lisp (offset)));
diff --git a/src/xterm.c b/src/xterm.c
index 1f377f8..646985b 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -10234,7 +10234,10 @@ handle_one_xevent (struct x_display_info *dpyinfo,
                  && xev->detail >= 4
                  && xev->detail <= 8
                  && xev->flags & XIPointerEmulated)
-               goto XI_OTHER;
+               {
+                 *finish = X_EVENT_DROP;
+                 goto XI_OTHER;
+               }
 #endif
 
              device = xi_device_from_id (dpyinfo, xev->deviceid);



reply via email to

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