commit 6ffc091e1704f27c7d8f9caf497ea435f720c724 (HEAD, refs/remotes/origin/master) Author: Fabrice Bauzac-Stehly Date: Fri Sep 2 00:23:46 2022 -0400 ldap-host-parameters-alist: Add auth-source option * lisp/net/ldap.el (ldap-host-parameters-alist): Add auth-source to checklist. diff --git a/lisp/net/ldap.el b/lisp/net/ldap.el index 5e14589d19..062ff05d69 100644 --- a/lisp/net/ldap.el +++ b/lisp/net/ldap.el @@ -72,6 +72,9 @@ HOST is the hostname of an LDAP server (with an optional TCP port number appended to it using a colon as a separator). PROPn and VALn are property/value pairs describing parameters for the server. Valid properties include: + `auth-source' specifies whether or not to look up, via the + `auth-source' library, options which are not otherwise provided + in this list. See `ldap-search-internal'. `binddn' is the distinguished name of the user to bind as (in RFC 1779 syntax). `passwd' is the password to use for simple authentication. @@ -90,6 +93,11 @@ Valid properties include: (string :tag "Host name") (checklist :inline t :greedy t + (list + :tag "Use auth-source" + :inline t + (const :tag "Use auth-source" auth-source) + boolean) (list :tag "Search Base" :inline t commit 4db596d316263a12bacf1632092a04032a8cde1c Author: Jim Porter Date: Wed Aug 31 22:52:34 2022 -0700 Under no-X builds, allow any value for 'fringe-bitmap' options * lisp/cus-edit (fringe-bitmap): Always match under no-X. diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index d3768766be..ee32c9c945 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -4298,7 +4298,12 @@ restoring it to the state of a face that has never been customized." "A Lisp fringe bitmap name." :format "%v" :tag "Fringe bitmap" - :match (lambda (_widget value) (fringe-bitmap-p value)) + :match (lambda (_widget value) + ;; In no-X builds (where `fringe-bitmaps' is undefined), + ;; allow anything. This ensures that customizations set on + ;; a with-X build aren't considered invalid under no-X. + (or (not (boundp 'fringe-bitmaps)) + (fringe-bitmap-p value))) :completions (apply-partially #'completion-table-with-predicate obarray #'fringe-bitmap-p 'strict) :prompt-match 'fringe-bitmap-p commit 177811ac0c0e5e41d4f661e8e5553e46f0019b9a Author: Po Lu Date: Thu Sep 1 21:22:17 2022 +0800 Fix bug#57476 for Xt builds * src/xterm.c (handle_one_xevent): Add similar event mode check to code under USE_X_TOOLKIT conditional. (bug#57476) diff --git a/src/xterm.c b/src/xterm.c index e8c56d68ea..71b84f8174 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -20951,7 +20951,11 @@ handle_one_xevent (struct x_display_info *dpyinfo, just looks up a top window on Xt builds. */ #ifdef HAVE_XINPUT2_1 - if (leave->detail != XINotifyInferior && f) + if (leave->detail != XINotifyInferior && f + && leave->mode != XINotifyUngrab + && leave->mode != XINotifyGrab + && leave->mode != XINotifyPassiveUngrab + && leave->mode != XINotifyPassiveGrab) xi_reset_scroll_valuators_for_device_id (dpyinfo, leave->deviceid, false); #endif commit 119d59531e19893cdc7eda2abe7174261adcbcaa Author: Lars Ingebrigtsen Date: Thu Sep 1 13:42:19 2022 +0200 Make easy-mmode-define-keymap obsolete * lisp/emacs-lisp/easy-mmode.el (easy-mmode-define-keymap): Make obsolete. (define-minor-mode): Add comment. diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 29ace89c3c..a1398bd12e 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -417,6 +417,8 @@ No problems result if this variable is not bound. `(defvar ,keymap-sym (let ((m ,keymap)) (cond ((keymapp m) m) + ;; FIXME: `easy-mmode-define-keymap' is obsolete, + ;; so this form should also be obsolete somehow. ((listp m) (easy-mmode-define-keymap m)) (t (error "Invalid keymap %S" m)))) ,(format "Keymap for `%s'." mode-name))) @@ -679,6 +681,7 @@ Valid keywords and arguments are: :group Ignored. :suppress Non-nil to call `suppress-keymap' on keymap, `nodigits' to suppress digits as prefix arguments." + (declare (obsolete define-keymap "29.1")) (let (inherit dense suppress) (while args (let ((key (pop args)) commit 8bb5c1bfec0929f2ba419e1c503f5acc01c336c2 Author: Lars Ingebrigtsen Date: Thu Sep 1 13:39:14 2022 +0200 Make easy-mmode-defmap obsolete and adjust only caller * lisp/emacs-lisp/easy-mmode.el (easy-mmode-defmap): Make obsolete. * lisp/progmodes/gud.el (gud-menu-map): Use easy-menu-define. diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index c3a4e9fc7a..29ace89c3c 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -719,9 +719,7 @@ The M, BS, and ARGS arguments are as per that function. DOC is the constant's documentation. This macro is deprecated; use `defvar-keymap' instead." - ;; FIXME: Declare obsolete in favor of `defvar-keymap'. It is still - ;; used for `gud-menu-map' and `gud-minor-mode-map', so fix that first. - (declare (doc-string 3) (indent 1)) + (declare (doc-string 3) (indent 1) (obsolete defvar-keymap "29.1")) `(defconst ,m (easy-mmode-define-keymap ,bs nil (if (boundp ',m) ,m) ,(cons 'list args)) ,doc)) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index ccc5720575..281762fb0a 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -159,143 +159,96 @@ Used to gray out relevant toolbar icons.") (t (comint-interrupt-subjob))))) -(easy-mmode-defmap gud-menu-map - '(([help] "Info (debugger)" . gud-goto-info) - ([tooltips] menu-item "Show GUD tooltips" gud-tooltip-mode - :enable (and (not emacs-basic-display) - (display-graphic-p) - (fboundp 'x-show-tip)) - :visible (memq gud-minor-mode - '(gdbmi guiler dbx sdb xdb pdb)) - :button (:toggle . gud-tooltip-mode)) - ([refresh] "Refresh" . gud-refresh) - ([run] menu-item "Run" gud-run - :enable (not gud-running) - :visible (or (memq gud-minor-mode '(gdb dbx jdb)) - (and (eq gud-minor-mode 'gdbmi) - (or (not (gdb-show-run-p)) - (bound-and-true-p - gdb-active-process))))) - ([go] . (menu-item (if (bound-and-true-p gdb-active-process) - "Continue" "Run") - gud-go - :visible (and (eq gud-minor-mode 'gdbmi) - (gdb-show-run-p)))) - ([stop] menu-item "Stop" gud-stop-subjob - :visible (or (not (memq gud-minor-mode '(gdbmi pdb))) - (and (eq gud-minor-mode 'gdbmi) - (gdb-show-stop-p)))) - ([until] menu-item "Continue to selection" gud-until - :enable (not gud-running) - :visible (and (memq gud-minor-mode '(gdbmi gdb perldb)) - (gud-tool-bar-item-visible-no-fringe))) - ([remove] menu-item "Remove Breakpoint" gud-remove - :enable (not gud-running) - :visible (gud-tool-bar-item-visible-no-fringe)) - ([tbreak] menu-item "Temporary Breakpoint" gud-tbreak - :enable (not gud-running) - :visible (memq gud-minor-mode - '(gdbmi gdb sdb xdb))) - ([break] menu-item "Set Breakpoint" gud-break - :enable (not gud-running) - :visible (gud-tool-bar-item-visible-no-fringe)) - ([up] menu-item "Up Stack" gud-up - :enable (not gud-running) - :visible (memq gud-minor-mode - '(gdbmi gdb guiler dbx xdb jdb pdb))) - ([down] menu-item "Down Stack" gud-down - :enable (not gud-running) - :visible (memq gud-minor-mode - '(gdbmi gdb guiler dbx xdb jdb pdb))) - ([pp] menu-item "Print S-expression" gud-pp - :enable (and (not gud-running) - (bound-and-true-p gdb-active-process)) - :visible (and (string-equal - (buffer-local-value - 'gud-target-name gud-comint-buffer) - "emacs") - (eq gud-minor-mode 'gdbmi))) - ([print*] . (menu-item (if (eq gud-minor-mode 'jdb) - "Dump object" - "Print Dereference") - gud-pstar - :enable (not gud-running) - :visible (memq gud-minor-mode '(gdbmi gdb jdb)))) - ([print] menu-item "Print Expression" gud-print - :enable (not gud-running)) - ([watch] menu-item "Watch Expression" gud-watch - :enable (not gud-running) - :visible (eq gud-minor-mode 'gdbmi)) - ([finish] menu-item "Finish Function" gud-finish - :enable (not gud-running) - :visible (memq gud-minor-mode - '(gdbmi gdb guiler xdb jdb pdb))) - ([stepi] menu-item "Step Instruction" gud-stepi - :enable (not gud-running) - :visible (memq gud-minor-mode '(gdbmi gdb dbx))) - ([nexti] menu-item "Next Instruction" gud-nexti - :enable (not gud-running) - :visible (memq gud-minor-mode '(gdbmi gdb dbx))) - ([step] menu-item "Step Line" gud-step - :enable (not gud-running)) - ([next] menu-item "Next Line" gud-next - :enable (not gud-running)) - ([cont] menu-item "Continue" gud-cont - :enable (not gud-running) - :visible (not (eq gud-minor-mode 'gdbmi)))) - "Menu for `gud-mode'." - :name "Gud") - -(easy-mmode-defmap gud-minor-mode-map - (append - `(([menu-bar debug] . ("Gud" . ,gud-menu-map))) - ;; Get tool bar like functionality from the menu bar on a text only - ;; terminal. - (unless window-system - `(([menu-bar down] - . (,(propertize "down" 'face 'font-lock-doc-face) . gud-down)) - ([menu-bar up] - . (,(propertize "up" 'face 'font-lock-doc-face) . gud-up)) - ([menu-bar finish] - . (,(propertize "finish" 'face 'font-lock-doc-face) . gud-finish)) - ([menu-bar step] - . (,(propertize "step" 'face 'font-lock-doc-face) . gud-step)) - ([menu-bar next] - . (,(propertize "next" 'face 'font-lock-doc-face) . gud-next)) - ([menu-bar until] menu-item - ,(propertize "until" 'face 'font-lock-doc-face) gud-until - :visible (memq gud-minor-mode '(gdbmi gdb perldb))) - ([menu-bar cont] menu-item - ,(propertize "cont" 'face 'font-lock-doc-face) gud-cont - :visible (not (eq gud-minor-mode 'gdbmi))) - ([menu-bar run] menu-item - ,(propertize "run" 'face 'font-lock-doc-face) gud-run - :visible (memq gud-minor-mode '(gdbmi gdb dbx jdb))) - ([menu-bar go] menu-item - ,(propertize " go " 'face 'font-lock-doc-face) gud-go - :visible (and (eq gud-minor-mode 'gdbmi) - (gdb-show-run-p))) - ([menu-bar stop] menu-item - ,(propertize "stop" 'face 'font-lock-doc-face) gud-stop-subjob - :visible (or (and (eq gud-minor-mode 'gdbmi) - (gdb-show-stop-p)) - (not (eq gud-minor-mode 'gdbmi)))) - ([menu-bar print] - . (,(propertize "print" 'face 'font-lock-doc-face) . gud-print)) - ([menu-bar tools] . undefined) - ([menu-bar buffer] . undefined) - ([menu-bar options] . undefined) - ([menu-bar edit] . undefined) - ([menu-bar file] . undefined)))) - "Map used in visited files.") - -(setf (alist-get 'gud-minor-mode minor-mode-map-alist) - gud-minor-mode-map) - -(defvar gud-mode-map +(defvar-keymap gud-mode-map ;; Will inherit from comint-mode via define-derived-mode. - (make-sparse-keymap) - "`gud-mode' keymap.") + :doc "`gud-mode' keymap.") + +(defvar-keymap gud-minor-mode-map + :parent gud-mode-map) + +(easy-menu-define gud-menu-map gud-mode-map + "Menu for `gud-mode'." + '("Gud" + ["Continue" gud-cont + :enable (not gud-running) + :visible (not (eq gud-minor-mode 'gdbmi))] + ["Next Line" gud-next + :enable (not gud-running)] + ["Step Line" gud-step + :enable (not gud-running)] + ["Next Instruction" gud-nexti + :enable (not gud-running) + :visible (memq gud-minor-mode '(gdbmi gdb dbx))] + ["Step Instruction" gud-stepi + :enable (not gud-running) + :visible (memq gud-minor-mode '(gdbmi gdb dbx))] + ["Finish Function" gud-finish + :enable (not gud-running) + :visible (memq gud-minor-mode '(gdbmi gdb guiler xdb jdb pdb))] + ["Watch Expression" gud-watch + :enable (not gud-running) + :visible (eq gud-minor-mode 'gdbmi)] + ["Print Expression" gud-print + :enable (not gud-running)] + ["Dump object-Derefenrece" gud-pstar + :label (if (eq gud-minor-mode 'jdb) + "Dump object" + "Print Dereference") + :enable (not gud-running) + :visible (memq gud-minor-mode '(gdbmi gdb jdb))] + ["Print S-expression" gud-pp + :enable (and (not gud-running) + (bound-and-true-p gdb-active-process)) + :visible (and (string-equal + (buffer-local-value + 'gud-target-name gud-comint-buffer) + "emacs") + (eq gud-minor-mode 'gdbmi))] + ["Down Stack" gud-down + :enable (not gud-running) + :visible (memq gud-minor-mode '(gdbmi gdb guiler dbx xdb jdb pdb))] + ["Up Stack" gud-up + :enable (not gud-running) + :visible (memq gud-minor-mode + '(gdbmi gdb guiler dbx xdb jdb pdb))] + ["Set Breakpoint" gud-break + :enable (not gud-running) + :visible (gud-tool-bar-item-visible-no-fringe)] + ["Temporary Breakpoint" gud-tbreak + :enable (not gud-running) + :visible (memq gud-minor-mode '(gdbmi gdb sdb xdb))] + ["Remove Breakpoint" gud-remove + :enable (not gud-running) + :visible (gud-tool-bar-item-visible-no-fringe)] + ["Continue to selection" gud-until + :enable (not gud-running) + :visible (and (memq gud-minor-mode '(gdbmi gdb perldb)) + (gud-tool-bar-item-visible-no-fringe))] + ["Stop" gud-stop-subjob + :visible (or (not (memq gud-minor-mode '(gdbmi pdb))) + (and (eq gud-minor-mode 'gdbmi) + (gdb-show-stop-p)))] + ["Continue-Run" gud-go + :label (if (bound-and-true-p gdb-active-process) + "Continue" "Run") + :visible (and (eq gud-minor-mode 'gdbmi) + (gdb-show-run-p))] + ["Run" gud-run + :enable (not gud-running) + :visible (or (memq gud-minor-mode '(gdb dbx jdb)) + (and (eq gud-minor-mode 'gdbmi) + (or (not (gdb-show-run-p)) + (bound-and-true-p + gdb-active-process))))] + ["Refresh" gud-refresh] + ["Show GUD tooltips" gud-tooltip-mode + :enable (and (not emacs-basic-display) + (display-graphic-p) + (fboundp 'x-show-tip)) + :visible (memq gud-minor-mode + '(gdbmi guiler dbx sdb xdb pdb)) + :button (:toggle . gud-tooltip-mode)] + ["Info (debugger)" gud-goto-info])) (defvar gud-tool-bar-map (let ((map (make-sparse-keymap))) commit d029ec8d76d0d949bfeacc3364061d879d84ee6e Author: Lars Ingebrigtsen Date: Thu Sep 1 12:24:17 2022 +0200 Fix outline-minor-mode-map * lisp/outline.el (outline-minor-mode): Avoid using easy-mmode-define-keymap, since it doesn't handle :inherit correctly (bug#57512). diff --git a/lisp/outline.el b/lisp/outline.el index 857ac9562f..2e18fd5b8f 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -444,10 +444,10 @@ outline font-lock faces to those of major mode." See the command `outline-mode' for more information on this mode." :lighter " Outl" - :keymap (easy-mmode-define-keymap - `(([menu-bar] . ,outline-minor-mode-menu-bar-map) - (,outline-minor-mode-prefix . ,outline-mode-prefix-map)) - :inherit outline-minor-mode-cycle-map) + :keymap (define-keymap + :parent outline-minor-mode-cycle-map + "" outline-minor-mode-menu-bar-map + (key-description outline-minor-mode-prefix) outline-mode-prefix-map) (if outline-minor-mode (progn (when outline-minor-mode-highlight commit f0319cd86f8d147e443bcaa0927937ccf052fbd0 Author: Daanturo Date: Thu Sep 1 12:08:05 2022 +0200 Make file-parent-directory more efficient * lisp/files.el (file-parent-directory): Use equal instead of file-equal-p to compare the found parent and the child (bug#56355). This is much faster. diff --git a/lisp/files.el b/lisp/files.el index 740e09055b..b084dca8b7 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -5196,7 +5196,9 @@ to `default-directory', and the result will also be relative." (cond ;; filename is at top-level, therefore no parent ((or (null parent) - (file-equal-p parent expanded-filename)) + ;; `equal' is enough, we don't need to resolve symlinks here + ;; with `file-equal-p', also for performance + (equal parent expanded-filename)) nil) ;; filename is relative, return relative parent ((not (file-name-absolute-p filename)) commit e7193902b23deb842f55c1cd9100b807e199f4bd Author: Mattias EngdegÄrd Date: Wed Aug 31 14:31:31 2022 +0200 Better `take` and `ntake` bignum argument handling * src/fns.c (Ftake, Fntake): Treat positive bignum arguments as most-positive-fixnum which results in better error checking of improper lists. diff --git a/src/fns.c b/src/fns.c index 07102256fe..2f4808be3d 100644 --- a/src/fns.c +++ b/src/fns.c @@ -1563,18 +1563,21 @@ If N is zero or negative, return nil. If N is greater or equal to the length of LIST, return LIST (or a copy). */) (Lisp_Object n, Lisp_Object list) { - if (BIGNUMP (n)) + EMACS_INT m; + if (FIXNUMP (n)) + { + m = XFIXNUM (n); + if (m <= 0) + return Qnil; + } + else if (BIGNUMP (n)) { if (mpz_sgn (*xbignum_val (n)) < 0) return Qnil; - CHECK_LIST (list); - return list; + m = MOST_POSITIVE_FIXNUM; } - if (!FIXNUMP (n)) + else wrong_type_argument (Qintegerp, n); - EMACS_INT m = XFIXNUM (n); - if (m <= 0) - return Qnil; CHECK_LIST (list); if (NILP (list)) return Qnil; @@ -1602,18 +1605,21 @@ If N is greater or equal to the length of LIST, return LIST unmodified. Otherwise, return LIST after truncating it. */) (Lisp_Object n, Lisp_Object list) { - if (BIGNUMP (n)) + EMACS_INT m; + if (FIXNUMP (n)) + { + m = XFIXNUM (n); + if (m <= 0) + return Qnil; + } + else if (BIGNUMP (n)) { if (mpz_sgn (*xbignum_val (n)) < 0) return Qnil; - CHECK_LIST (list); - return list; + m = MOST_POSITIVE_FIXNUM; } - if (!FIXNUMP (n)) + else wrong_type_argument (Qintegerp, n); - EMACS_INT m = XFIXNUM (n); - if (m <= 0) - return Qnil; CHECK_LIST (list); Lisp_Object tail = list; --m; commit 941627f8d03ddf4cd0039902e494d0feabc88c85 Author: Eli Zaretskii Date: Thu Sep 1 11:04:46 2022 +0300 ; * etc/NEWS: Fix documentation marking of recently-added entries. diff --git a/etc/NEWS b/etc/NEWS index 8d251448d3..89f4cd0ac7 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1535,13 +1535,13 @@ completion, and adds the Emoji into the search string. This allows an easy way to toggle seeing all glyphless characters in the current buffer. -+++ +--- *** The extra slot of 'glyphless-char-display' can now have cons values. The extra slot of the 'glyphless-char-display' char-table can now have values that are cons cells, specifying separate values for text-mode and GUI terminals. ---- ++++ *** "Replacement character" feature for undisplayable characters on TTYs. The 'acronym' method of displaying glyphless characters on text-mode frames treats single-character acronyms specially: they are displayed