commit 58bcd1dbe0b70a331747ccfd2f9e5cf8790849a1 (HEAD, refs/remotes/origin/master) Author: Juri Linkov Date: Thu Oct 10 09:17:00 2024 +0300 ; Fix typos diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 541c91ddae2..d9e99d9ca5c 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -6806,7 +6806,7 @@ parameter is installed and updated by the function @item quit-restore-prev @vindex quit-restore@r{, a window parameter} @vindex quit-restore-prev@r{, a window parameter} -These parameters ares installed by the buffer display functions +These parameters are installed by the buffer display functions (@pxref{Choosing Window}) and consulted by @code{quit-restore-window} (@pxref{Quitting Windows}). They are lists of four elements, see the description of @code{quit-restore-window} in @ref{Quitting Windows} for diff --git a/etc/NEWS b/etc/NEWS index 2cd3b5893a1..e57991901c5 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -437,7 +437,7 @@ overlap. *** 'diff-apply-hunk' now supports creating and deleting files. --- -*** 'vc-version-diff' and 'vc-root-revsion-diff' changed default for REV1. +*** 'vc-version-diff' and 'vc-root-version-diff' changed default for REV1. They suggest the previous revision as the default for REV1, not the last one as before. This makes them different from 'vc-diff' and 'vc-root-diff' when those are called without a prefix argument. commit cb0b6a405706f6367d9adfb3ee447590c2a0876f Author: Wilson Snyder Date: Wed Oct 9 22:33:54 2024 -0400 verilog-mode.el: Fix AUTOWIRE etc. range simplification with subtraction of negative number. * lisp/progmodes/verilog-mode.el (verilog-simplify-range-expression): Fix AUTOWIRE etc. range simplification with subtraction of negative number (#1879). diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index 65545d523a8..58dc234adfe 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el @@ -9,7 +9,7 @@ ;; Keywords: languages ;; The "Version" is the date followed by the decimal rendition of the Git ;; commit hex. -;; Version: 2024.03.01.121933719 +;; Version: 2024.10.09.140346409 ;; Yoni Rabkin contacted the maintainer of this ;; file on 19/3/2008, and the maintainer agreed that when a bug is @@ -124,7 +124,7 @@ ;; ;; This variable will always hold the version number of the mode -(defconst verilog-mode-version "2024-03-01-7448f97-vpo-GNU" +(defconst verilog-mode-version "2024-10-09-85d8429-vpo-GNU" "Version of this Verilog mode.") (defconst verilog-mode-release-emacs t "If non-nil, this version of Verilog mode was released with Emacs itself.") @@ -11441,6 +11441,7 @@ This repairs those mis-inserted by an AUTOARG." ;; Prefix regexp needs beginning of match, or some symbol of ;; lesser or equal precedence. We assume the [:]'s exist in expr. ;; Ditto the end. + ;;(message "sre: out=%s" out) (while (string-match (concat "\\([[({:*/<>+-]\\)" ; - must be last "(\\<\\([0-9A-Za-z_]+\\))" @@ -11486,19 +11487,23 @@ This repairs those mis-inserted by an AUTOARG." out) (let ((pre (match-string 1 out)) (lhs (string-to-number (match-string 2 out))) + (op (match-string 3 out)) (rhs (string-to-number (match-string 4 out))) (post (match-string 5 out)) val) (when (equal pre "-") (setq lhs (- lhs))) - (setq val (if (equal (match-string 3 out) "-") + (setq val (if (equal op "-") (- lhs rhs) (+ lhs rhs)) out (replace-match - (concat (if (and (equal pre "-") - (< val 0)) - "" ; Not "--20" but just "-20" - pre) + (concat (cond ((and (equal pre "-") + (< val 0)) + "") ; Not "--20" but just "-20" + ((and (equal pre "-") + (> val 0)) + "+") ; Not "-+20" but just "+20" + (t pre)) (int-to-string val) post) nil nil out)) )) @@ -11526,19 +11531,20 @@ This repairs those mis-inserted by an AUTOARG." nil nil out))))) out))) -;;(verilog-simplify-range-expression "[1:3]") ; 1 -;;(verilog-simplify-range-expression "[(1):3]") ; 1 -;;(verilog-simplify-range-expression "[(((16)+1)+1+(1+1))]") ; 20 -;;(verilog-simplify-range-expression "[(2*3+6*7)]") ; 48 -;;(verilog-simplify-range-expression "[(FOO*4-1*2)]") ; FOO*4-2 -;;(verilog-simplify-range-expression "[(FOO*4+1-1)]") ; FOO*4+0 -;;(verilog-simplify-range-expression "[(func(BAR))]") ; func(BAR) -;;(verilog-simplify-range-expression "[FOO-1+1-1+1]") ; FOO-0 -;;(verilog-simplify-range-expression "[$clog2(2)]") ; 1 -;;(verilog-simplify-range-expression "[$clog2(7)]") ; 3 -;;(verilog-simplify-range-expression "[(TEST[1])-1:0]") -;;(verilog-simplify-range-expression "[1<<2:8>>2]") ; [4:2] -;;(verilog-simplify-range-expression "[2*4/(4-2) +2+4 <<4 >>2]") +;;(verilog-simplify-range-expression "[1:3]") ; "[1:3]" +;;(verilog-simplify-range-expression "[(1):3]") ; "[1:3]" +;;(verilog-simplify-range-expression "[(((16)+1)+1+(1+1))]") ; "[20]" +;;(verilog-simplify-range-expression "[(2*3+6*7)]") ; "[48]" +;;(verilog-simplify-range-expression "[(FOO*4-1*2)]") ; "[FOO*4-2]" +;;(verilog-simplify-range-expression "[(FOO*4+1-1)]") ; "[FOO*4+0]" +;;(verilog-simplify-range-expression "[(func(BAR))]") ; "[func(BAR)]" +;;(verilog-simplify-range-expression "[FOO-1+1-1+1]") ; "[FOO-0]" +;;(verilog-simplify-range-expression "[FOO-1+2:LSB-3+1]") ; "[FOO+1:LSB-1]" +;;(verilog-simplify-range-expression "[$clog2(2)]") ; "[1]" +;;(verilog-simplify-range-expression "[$clog2(7)]") ; "[3]" +;;(verilog-simplify-range-expression "[(TEST[1])-1:0]") ; "[(TEST[1])-1:0]" +;;(verilog-simplify-range-expression "[1<<2:8>>2]") ; "[4:2]" +;;(verilog-simplify-range-expression "[2*4/(4-2) +2+4 <<4 >>2]") ; "[8/(2) +2+4 <<4 >>2]" ;;(verilog-simplify-range-expression "[WIDTH*2/8-1:0]") ; "[WIDTH*2/8-1:0]" ;;(verilog-simplify-range-expression "[(FOO).size:0]") ; "[FOO.size:0]" commit a295d7de9e8cae03fd4be6838d7eee59381791e4 Author: Dmitry Gutov Date: Thu Oct 10 02:08:53 2024 +0300 Make revision completion in vc-diff and vc-root-diff more predictable * lisp/vc/vc.el (vc-root-version-diff): Don't try calling 'vc-deduce-fileset', instead construct a fileset suitable for the root directory right away. This way the revision completion for the root diff doesn't depend on the current buffer, or the file at point (bug#73232). (vc-diff-build-argument-list-internal): No special case when invoked on a directory, or when the current file is not "dirty". Make REV1-DEFAULT a string value. * etc/NEWS: Mention the change. diff --git a/etc/NEWS b/etc/NEWS index 67d768f0584..2cd3b5893a1 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -436,6 +436,12 @@ overlap. *** 'diff-apply-hunk' now supports creating and deleting files. +--- +*** 'vc-version-diff' and 'vc-root-revsion-diff' changed default for REV1. +They suggest the previous revision as the default for REV1, not the last +one as before. This makes them different from 'vc-diff' and +'vc-root-diff' when those are called without a prefix argument. + ** php-ts-mode --- diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 597a1622f5a..a30ba06aec3 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -2074,20 +2074,15 @@ INITIAL-INPUT are passed on to `vc-read-revision' directly." ;; filesets, but not yet. ((/= (length files) 1) nil) - ;; if it's a directory, don't supply any revision default - ((file-directory-p first) - nil) - ;; if the file is not up-to-date, use working revision as older revision - ((not (vc-up-to-date-p first)) - (setq rev1-default (vc-working-revision first))) - ;; if the file is not locked, use last revision and current source as defaults + ;; if the file is not locked, use previous revision and current source as defaults (t - (setq rev1-default (ignore-errors ;If `previous-revision' doesn't work. - (vc-call-backend backend 'previous-revision first - (vc-working-revision first)))) - (when (string= rev1-default "") (setq rev1-default nil)))) + (push (ignore-errors ;If `previous-revision' doesn't work. + (vc-call-backend backend 'previous-revision first + (vc-working-revision first backend))) + rev1-default) + (when (member (car rev1-default) '("" nil)) (setq rev1-default nil)))) ;; construct argument list - (let* ((rev1-prompt (format-prompt "Older revision" rev1-default)) + (let* ((rev1-prompt (format-prompt "Older revision" (car rev1-default))) (rev2-prompt (format-prompt "Newer revision" ;; (or rev2-default "current source")) @@ -2101,8 +2096,8 @@ INITIAL-INPUT are passed on to `vc-read-revision' directly." (defun vc-version-diff (_files rev1 rev2) "Report diffs between revisions REV1 and REV2 in the repository history. This compares two revisions of the current fileset. -If REV1 is nil, it defaults to the current revision, i.e. revision -of the last commit. +If REV1 is nil, it defaults to the previous revision, i.e. revision +before the last commit. If REV2 is nil, it defaults to the work tree, i.e. the current state of each file in the fileset." (interactive (vc-diff-build-argument-list-internal)) @@ -2119,9 +2114,8 @@ state of each file in the fileset." "Report diffs between REV1 and REV2 revisions of the whole tree." (interactive (vc-diff-build-argument-list-internal - (or (ignore-errors (vc-deduce-fileset t)) - (let ((backend (or (vc-deduce-backend) (vc-responsible-backend default-directory)))) - (list backend (list (vc-call-backend backend 'root default-directory))))))) + (let ((backend (or (vc-deduce-backend) (vc-responsible-backend default-directory)))) + (list backend (list (vc-call-backend backend 'root default-directory)))))) ;; This is a mix of `vc-root-diff' and `vc-version-diff' (when (and (not rev1) rev2) (error "Not a valid revision range"))