commit 4042dad139d922723aabcfaef5662db8204fb355 (HEAD, refs/remotes/origin/master) Author: Stefan Kangas Date: Mon Sep 9 04:14:50 2019 +0200 Match Python 3 code object names in "M-x pdb" * lisp/progmodes/gud.el (gud-pdb-marker-regexp): Match Python 3 code object names. (Bug#11679) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 30d4b19911..235546ef2e 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -1610,7 +1610,9 @@ and source-file directory for your debugger." ;; characters we match in the file name shown in the prompt. ;; (Of course, this matches the "" case too.) (defvar gud-pdb-marker-regexp - "^> \\([[:graph:] \\]*\\)(\\([0-9]+\\))\\([a-zA-Z0-9_]*\\|\\?\\|\\)()\\(->[^\n\r]*\\)?[\n\r]") + (concat "^> \\([[:graph:] \\]*\\)(\\([0-9]+\\))\\([a-zA-Z0-9_]*\\|\\?\\|" + "<\\(?:module\\|listcomp\\|dictcomp\\|setcomp\\|genexpr\\|lambda\\|\\)>" + "\\)()\\(->[^\n\r]*\\)?[\n\r]")) (defvar gud-pdb-marker-regexp-file-group 1) (defvar gud-pdb-marker-regexp-line-group 2) commit a1e93c163372716fc475097290ff7a57b3e58008 Author: Stefan Kangas Date: Mon Sep 9 01:04:23 2019 +0200 ; * lisp/ps-print.el: Doc fix. diff --git a/lisp/ps-print.el b/lisp/ps-print.el index 8dd1d1e2bf..5956c9f081 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el @@ -1320,29 +1320,18 @@ Please send all bug fixes and enhancements to ;; Known bugs and limitations of ps-print ;; -------------------------------------- ;; -;; Although color printing will work in XEmacs 19.12, it doesn't work well; in -;; particular, bold or italic fonts don't print in the right background color. -;; -;; Invisible properties aren't correctly ignored in XEmacs 19.12. -;; ;; Automatic font-attribute detection doesn't work well, especially with ;; hilit19 and older versions of get-create-face. Users having problems with ;; auto-font detection should use the lists `ps-italic-faces', `ps-bold-faces' ;; and `ps-underlined-faces' and/or turn off automatic detection by setting ;; `ps-auto-font-detect' to nil. ;; -;; Automatic font-attribute detection doesn't work with XEmacs 19.12 in tty -;; mode; use the lists `ps-italic-faces', `ps-bold-faces' and -;; `ps-underlined-faces' instead. -;; ;; Still too slow; could use some hand-optimization. ;; ;; Default background color isn't working. ;; ;; Faces are always treated as opaque. ;; -;; Epoch, Lucid and Emacs 22 not supported. At all. -;; ;; Fixed-pitch fonts work better for line folding, but are not required. ;; ;; `ps-nb-pages-buffer' and `ps-nb-pages-region' don't take care of folding commit c86f91caf0645fabe10b056a68fb5a26654c0814 Author: Stefan Kangas Date: Mon Sep 9 00:24:18 2019 +0200 Remove final XEmacs compat code from dframe.el * lisp/dframe.el (top-level): Doc fix. (dframe-frame-parameter): Redefine as an obsolete function alias for 'frame-parameter'. diff --git a/lisp/dframe.el b/lisp/dframe.el index 72deb0c45e..91f89e1705 100644 --- a/lisp/dframe.el +++ b/lisp/dframe.el @@ -40,7 +40,7 @@ ;; * Frame/buffer killing hooks ;; * Mouse-3 position relative menu ;; * Mouse motion, help-echo hacks -;; * Mouse clicking, double clicking, & XEmacs image clicking hack +;; * Mouse clicking & double clicking ;; * Mode line hacking ;; * Utilities for use in a program covering: ;; o keymap massage for some actions @@ -56,7 +56,6 @@ ;; 1) (require 'dframe) ;; 2) Variable Setup: ;; -frame-parameters -- Frame parameters for Emacs. -;; -frame-plist -- Frame parameters for XEmacs. ;; -- Not on parameter lists: They can optionally include width ;; and height. If width or height is not included, then it will ;; be provided to match the originating frame. In general, @@ -112,13 +111,9 @@ ;;; Code: -;;; Compatibility functions -;; -(defalias 'dframe-frame-parameter - (if (fboundp 'frame-parameter) 'frame-parameter - (lambda (frame parameter) - "Return FRAME's PARAMETER value." - (cdr (assoc parameter (frame-parameters frame)))))) + +(define-obsolete-function-alias 'dframe-frame-parameter + 'frame-parameter "27.1") ;;; Variables @@ -322,8 +317,8 @@ CREATE-HOOK is a hook to run after creating a frame." (if (frame-live-p (symbol-value frame-var)) (raise-frame (symbol-value frame-var)) (set frame-var - (let* ((mh (dframe-frame-parameter dframe-attached-frame - 'menu-bar-lines)) + (let* ((mh (frame-parameter dframe-attached-frame + 'menu-bar-lines)) (paramsa ;; Only add a guessed height if one is not specified ;; in the input parameters. @@ -377,8 +372,8 @@ a cons cell indicating a position of the form (LEFT . TOP)." ;; Position dframe. ;; Do no positioning if not on a windowing system, (unless (or (not window-system) (eq window-system 'pc)) - (let* ((pfx (dframe-frame-parameter parent-frame 'left)) - (pfy (dframe-frame-parameter parent-frame 'top)) + (let* ((pfx (frame-parameter parent-frame 'left)) + (pfy (frame-parameter parent-frame 'top)) (pfw (+ (tool-bar-pixel-width parent-frame) (frame-pixel-width parent-frame))) (pfh (frame-pixel-height parent-frame)) commit 69db930c7ecb821df7183204cef576557659e92f Author: Stefan Monnier Date: Sun Sep 8 18:41:43 2019 -0400 * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Define setter functions. When :noinline is specified one can't rely on setf expanding the inlinable function to construct the setter. Fixes bug#37283. diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 1ae7266624..34d36067d4 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -2906,7 +2906,16 @@ Supported keywords for slots are: (error "Duplicate slots named %s in %s" slot name)) (let ((accessor (intern (format "%s%s" conc-name slot))) (default-value (pop desc)) - (doc (plist-get desc :documentation))) + (doc (plist-get desc :documentation)) + (access-body + `(progn + ,@(and pred-check + (list `(or ,pred-check + (signal 'wrong-type-argument + (list ',name cl-x))))) + ,(if (memq type '(nil vector)) `(aref cl-x ,pos) + (if (= pos 0) '(car cl-x) + `(nth ,pos cl-x)))))) (push slot slots) (push default-value defaults) ;; The arg "cl-x" is referenced by name in eg pred-form @@ -2916,13 +2925,7 @@ Supported keywords for slots are: slot name (if doc (concat "\n" doc) "")) (declare (side-effect-free t)) - ,@(and pred-check - (list `(or ,pred-check - (signal 'wrong-type-argument - (list ',name cl-x))))) - ,(if (memq type '(nil vector)) `(aref cl-x ,pos) - (if (= pos 0) '(car cl-x) - `(nth ,pos cl-x)))) + ,access-body) forms) (when (cl-oddp (length desc)) (push @@ -2942,11 +2945,18 @@ Supported keywords for slots are: forms) (push kw desc) (setcar defaults nil)))) - (if (plist-get desc ':read-only) - (push `(gv-define-expander ,accessor - (lambda (_cl-do _cl-x) - (error "%s is a read-only slot" ',accessor))) - forms) + (cond + ((eq defsym 'defun) + (unless (plist-get desc ':read-only) + (push `(defun ,(gv-setter accessor) (val cl-x) + (setf ,access-body val)) + forms))) + ((plist-get desc ':read-only) + (push `(gv-define-expander ,accessor + (lambda (_cl-do _cl-x) + (error "%s is a read-only slot" ',accessor))) + forms)) + (t ;; For normal slots, we don't need to define a setf-expander, ;; since gv-get can use the compiler macro to get the ;; same result. @@ -2964,7 +2974,7 @@ Supported keywords for slots are: ;; ,(and pred-check `',pred-check) ;; ,pos))) ;; forms) - ) + )) (if print-auto (nconc print-func (list `(princ ,(format " %s" slot) cl-s) commit e94d01f1aceba364f8b55978eed854127a08264b Author: Stefan Kangas Date: Mon Jul 1 16:16:06 2019 +0200 Remove support for upgrading from old bookmark file format * lisp/bookmark.el (bookmark-alist-from-buffer): Remove support for old bookmark file format. (Bug#37122) (bookmark-upgrade-version-0-alist) (bookmark-upgrade-file-format-from-0) (bookmark-grok-file-format-version) (bookmark-maybe-upgrade-file-format): Declare obsolete. (bookmark-load): Don't call 'bookmark-maybe-upgrade-file-format'. * etc/NEWS: Announce it. diff --git a/etc/NEWS b/etc/NEWS index d951444675..87666740df 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1835,6 +1835,16 @@ aliases of 'bookmark-default-file'. *** New user option 'bookmark-watch-bookmark-file'. When non-nil, watch whether the bookmark file has changed on disk. +--- +*** The old bookmark file format is no longer supported. +This bookmark file format has not been used in Emacs since at least +version 19.34, released in 1996, and will no longer be automatically +converted to the new bookmark file format. + +The following functions are now declared obsolete: +bookmark-grok-file-format-version, bookmark-maybe-upgrade-file-format, +bookmark-upgrade-file-format-from-0, bookmark-upgrade-version-0-alist + --- ** The mantemp.el library is now marked obsolete. This library generates manual C++ template instantiations. It should diff --git a/lisp/bookmark.el b/lisp/bookmark.el index f564cd6b43..e58e051a39 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -619,8 +619,8 @@ If POSN is non-nil, record POSN as the point instead of `(point)'." ;; was incorrect in Emacs 22 and Emacs 23.1.) ;; ;; To deal with the change from FIRST format to SECOND, conversion -;; code was added, and it is still in use. See -;; `bookmark-maybe-upgrade-file-format'. +;; code was added, which is no longer used and has been declared +;; obsolete. See `bookmark-maybe-upgrade-file-format'. ;; ;; No conversion from SECOND to CURRENT is done. Instead, the code ;; handles both formats OK. It must continue to do so. @@ -640,7 +640,7 @@ You should never need to change this.") (defun bookmark-alist-from-buffer () - "Return a `bookmark-alist' (in any format) from the current buffer. + "Return a `bookmark-alist' from the current buffer. The buffer must of course contain bookmark format information. Does not care from where in the buffer it is called, and does not affect point." @@ -648,19 +648,13 @@ affect point." (goto-char (point-min)) (if (search-forward bookmark-end-of-version-stamp-marker nil t) (read (current-buffer)) - ;; Else we're dealing with format version 0 - (if (search-forward "(" nil t) - (progn - (forward-char -1) - (read (current-buffer))) - ;; Else no hope of getting information here. - (if buffer-file-name - (error "File not in bookmark format: %s" buffer-file-name) - (error "Buffer not in bookmark format: %s" (buffer-name))))))) - + (if buffer-file-name + (error "File not in bookmark format: %s" buffer-file-name) + (error "Buffer not in bookmark format: %s" (buffer-name)))))) (defun bookmark-upgrade-version-0-alist (old-list) "Upgrade a version 0 alist OLD-LIST to the current version." + (declare (obsolete nil "27.1")) (mapcar (lambda (bookmark) (let* ((name (car bookmark)) @@ -683,11 +677,14 @@ affect point." (defun bookmark-upgrade-file-format-from-0 () "Upgrade a bookmark file of format 0 (the original format) to format 1. This expects to be called from `point-min' in a bookmark file." + (declare (obsolete nil "27.1")) (let* ((reporter (make-progress-reporter (format "Upgrading bookmark format from 0 to %d..." - bookmark-file-format-version))) + bookmark-file-format-version))) (old-list (bookmark-alist-from-buffer)) - (new-list (bookmark-upgrade-version-0-alist old-list))) + (new-list (with-suppressed-warnings + ((obsolete bookmark-upgrade-version-0-alist)) + (bookmark-upgrade-version-0-alist old-list)))) (delete-region (point-min) (point-max)) (bookmark-insert-file-format-version-stamp buffer-file-coding-system) (pp new-list (current-buffer)) @@ -699,6 +696,7 @@ This expects to be called from `point-min' in a bookmark file." (defun bookmark-grok-file-format-version () "Return an integer which is the file-format version of this bookmark file. This expects to be called from `point-min' in a bookmark file." + (declare (obsolete nil "27.1")) (if (looking-at "^;;;;") (save-excursion (save-match-data @@ -714,12 +712,18 @@ This expects to be called from `point-min' in a bookmark file." "Check the file-format version of this bookmark file. If the version is not up-to-date, upgrade it automatically. This expects to be called from `point-min' in a bookmark file." - (let ((version (bookmark-grok-file-format-version))) + (declare (obsolete nil "27.1")) + (let ((version + (with-suppressed-warnings + ((obsolete bookmark-grok-file-format-version)) + (bookmark-grok-file-format-version)))) (cond ((= version bookmark-file-format-version) ) ; home free -- version is current ((= version 0) - (bookmark-upgrade-file-format-from-0)) + (with-suppressed-warnings + ((obsolete bookmark-upgrade-file-format-from-0)) + (bookmark-upgrade-file-format-from-0))) (t (error "Bookmark file format version strangeness"))))) @@ -1541,7 +1545,6 @@ unique numeric suffixes \"<2>\", \"<3>\", etc." (with-current-buffer (let (enable-local-variables) (find-file-noselect file)) (goto-char (point-min)) - (bookmark-maybe-upgrade-file-format) (let ((blist (bookmark-alist-from-buffer))) (unless (listp blist) (error "Invalid bookmark list in %s" file)) commit 7f85a5569d89322546c3ca21c38d9457db3b3665 Author: Juri Linkov Date: Sun Sep 8 23:27:23 2019 +0300 * lisp/tmm.el: Fix broken tmm-prompt (bug#34517) * lisp/tmm.el (tmm-prompt): Don't duplicate items of tmm--history. Don't reverse tmm-km-list for completion. Don't set the initial position of 'tmm--history. Use reverse tmm--history as the list of default values for M-n. (tmm-add-prompt): Don't insert initial value to the minibuffer. diff --git a/lisp/tmm.el b/lisp/tmm.el index bf76652f40..c1c863876b 100644 --- a/lisp/tmm.el +++ b/lisp/tmm.el @@ -240,8 +240,6 @@ instead of executing it." (car elt))) tmm-km-list))))) (setq history-len (length tmm--history)) - (setq tmm--history (append tmm--history tmm--history - tmm--history tmm--history)) (setq tmm-c-prompt (nth (- history-len 1 index-of-default) tmm--history)) (setq out @@ -249,18 +247,17 @@ instead of executing it." (car (nth index-of-default tmm-km-list)) (minibuffer-with-setup-hook #'tmm-add-prompt ;; tmm-km-list is reversed, because history - ;; needs it in LIFO order. But completion + ;; needs it in LIFO order. But default list ;; needs it in non-reverse order, so that the - ;; menu items are displayed as completion - ;; candidates in the order they are shown on - ;; the menu bar. So pass completing-read the + ;; menu items are displayed by M-n as default + ;; values in the order they are shown on + ;; the menu bar. So pass the DEFAULT arg the ;; reversed copy of the list. (completing-read-default (concat gl-str " (up/down to change, PgUp to menu): ") - (tmm--completion-table (reverse tmm-km-list)) nil t nil - (cons 'tmm--history - (- (* 2 history-len) index-of-default)))))))) + (tmm--completion-table tmm-km-list) nil t nil + 'tmm--history (reverse tmm--history))))))) (setq choice (cdr (assoc out tmm-km-list))) (and (null choice) (string-prefix-p tmm-c-prompt out) @@ -404,8 +401,7 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'." ;; Try to show everything just inserted and preserve height of ;; *Completions* window. This should fix a behavior described ;; in Bug#1291. - (fit-window-to-buffer window nil nil nil nil t))))) - (insert tmm-c-prompt)) + (fit-window-to-buffer window nil nil nil nil t)))))) (defun tmm-shortcut () "Choose the shortcut that the user typed." commit 034f9363e316920cd79151ba40fd8a21f85a383b Author: Alan Mackenzie Date: Sun Sep 8 10:44:27 2019 +0000 Fix untidinesses in compile.el. * lisp/progmodes/compile.el (compilation--margin-string): Renamed from compilation-margin-string. Use defconst rather than defvar. Use propertize rather than a separate put-text-property. Trim the doc string. diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index c1f23b16aa..f0b34c702c 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -2609,16 +2609,13 @@ column zero points to the current message." When non-nil, this overlay causes redisplay to display `overlay-arrow-string' at the overlay's start position.") -(defvar compilation-margin-string "=>" - "The string which will appear in the margin in compilation mode. -This must be two characters long; there should be no need to -change the default.") -(put-text-property 0 2 'face 'default compilation-margin-string) +(defconst compilation--margin-string (propertize "=>" 'face 'default) + "The string which will appear in the margin in compilation mode.") (defconst compilation--dummy-string (propertize ">" 'display - `((margin left-margin) ,compilation-margin-string)) - "A string which is only a placeholder for compilation-margin-string. + `((margin left-margin) ,compilation--margin-string)) + "A string which is only a placeholder for `compilation--margin-string'. Actual value is never used, only the text property.") (defun compilation-set-up-arrow-spec-in-margin () commit d42d46d11106a9541323e064792b23cc74c0f7f0 Author: Michael Albinus Date: Sun Sep 8 12:01:41 2019 +0200 Fix Bug#36090 * lisp/vc/vc-hg.el (vc-hg--pushpull, vc-hg-merge-branch) (vc-hg-command): Disable pager. (Bug#36090) diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index f287adf242..c2a5a6f70c 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -1359,6 +1359,8 @@ commands, which only operated on marked files." (mapcar (lambda (arg) (list "-r" arg)) marked-list))) (let* ((root (vc-hg-root default-directory)) (buffer (format "*vc-hg : %s*" (expand-file-name root))) + ;; Disable pager. + (process-environment (cons "HGPLAIN=1" process-environment)) (hg-program vc-hg-program) args) ;; If necessary, prompt for the exact command. @@ -1431,7 +1433,9 @@ call \"hg push -r REVS\" to push the specified revisions REVS." "Merge incoming changes into the current working directory. This runs the command \"hg merge\"." (let* ((root (vc-hg-root default-directory)) - (buffer (format "*vc-hg : %s*" (expand-file-name root)))) + (buffer (format "*vc-hg : %s*" (expand-file-name root))) + ;; Disable pager. + (process-environment (cons "HGPLAIN=1" process-environment))) (apply 'vc-do-async-command buffer root vc-hg-program '("merge")) (with-current-buffer buffer (vc-run-delayed (vc-compilation-mode 'hg))) (vc-set-async-update buffer))) @@ -1442,11 +1446,13 @@ This runs the command \"hg merge\"." "A wrapper around `vc-do-command' for use in vc-hg.el. This function differs from vc-do-command in that it invokes `vc-hg-program', and passes `vc-hg-global-switches' to it before FLAGS." - (apply 'vc-do-command (or buffer "*vc*") okstatus vc-hg-program file-or-list - (if (stringp vc-hg-global-switches) - (cons vc-hg-global-switches flags) - (append vc-hg-global-switches - flags)))) + ;; Disable pager. + (let ((process-environment (cons "HGPLAIN=1" process-environment))) + (apply 'vc-do-command (or buffer "*vc*") okstatus vc-hg-program file-or-list + (if (stringp vc-hg-global-switches) + (cons vc-hg-global-switches flags) + (append vc-hg-global-switches + flags))))) (defun vc-hg-root (file) (vc-find-root file ".hg"))