all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* add-log changes in 5e63c842
@ 2016-01-08 21:03 Glenn Morris
  2016-01-08 23:12 ` Paul Eggert
  0 siblings, 1 reply; 2+ messages in thread
From: Glenn Morris @ 2016-01-08 21:03 UTC (permalink / raw)
  To: Paul Eggert; +Cc: emacs-devel


Hi Paul,

The following change looks incorrect.
The "error" in a condition-case handler is not the "error" function.


commit 5e63c842007b0f85e91735a7c4e00be0b7fe9ba5
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Fri Aug 28 22:24:10 2015 -0700

    Fix minor text quoting in calc, calendar, vc
[...]    
    * lisp/vc/add-log.el (change-log-goto-source):
    Avoid double-formatting.

diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el
index e24b6cc..d120d05 100644
--- a/lisp/vc/add-log.el
+++ b/lisp/vc/add-log.el
@@ -481,9 +481,9 @@ try to visit the file for the change under `point' instead."
 		(apply 'change-log-goto-source-1
 		       (append change-log-find-head change-log-find-tail))
 	      (error
-	       (format "Cannot find more matches for tag `%s' in file `%s'"
-		       (car change-log-find-head)
-		       (nth 2 change-log-find-head)))))
+	       "Cannot find more matches for tag `%s' in file `%s'"
+	       (car change-log-find-head)
+	       (nth 2 change-log-find-head))))
     (save-excursion
       (let* ((at (point))
 	     (tag-at (change-log-search-tag-name))
@@ -515,9 +515,8 @@ try to visit the file for the change under `point' instead."
 	  (condition-case nil
 	      (setq change-log-find-tail
 		    (apply 'change-log-goto-source-1 change-log-find-head))
-	    (error
-	     (format "Cannot find matches for tag `%s' in file `%s'"
-		     tag file)))))))))
+	    (error "Cannot find matches for tag `%s' in file `%s'"
+		   tag file))))))))
 
 (defun change-log-next-error (&optional argp reset)
   "Move to the Nth (default 1) next match in a ChangeLog buffer.



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: add-log changes in 5e63c842
  2016-01-08 21:03 add-log changes in 5e63c842 Glenn Morris
@ 2016-01-08 23:12 ` Paul Eggert
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Eggert @ 2016-01-08 23:12 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 155 bytes --]

Glenn Morris wrote:
> The "error" in a condition-case handler is not the "error" function.

Thanks for catching that. Fixed in emacs-25 with the attached.

[-- Attachment #2: 0001-Fix-error-.-error.patch --]
[-- Type: text/x-diff, Size: 1691 bytes --]

From bb08f25c42f11dae2849e71aab241f603b9c3d0f Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Fri, 8 Jan 2016 14:53:10 -0800
Subject: [PATCH] Fix (error ...) error

Problem reported by Glenn Morris in:
http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00561.html
* lisp/vc/add-log.el (change-log-goto-source): Fix typos
introduced in my Aug 28 change, where I got confused by the
two meanings of (error ...).
---
 lisp/vc/add-log.el | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el
index a5fe956..45e8633 100644
--- a/lisp/vc/add-log.el
+++ b/lisp/vc/add-log.el
@@ -481,9 +481,10 @@ change-log-goto-source
 		(apply 'change-log-goto-source-1
 		       (append change-log-find-head change-log-find-tail))
 	      (error
-	       "Cannot find more matches for tag `%s' in file `%s'"
-	       (car change-log-find-head)
-	       (nth 2 change-log-find-head))))
+	       (format-message
+		"Cannot find more matches for tag `%s' in file `%s'"
+		(car change-log-find-head)
+		(nth 2 change-log-find-head)))))
     (save-excursion
       (let* ((at (point))
 	     (tag-at (change-log-search-tag-name))
@@ -515,8 +516,9 @@ change-log-goto-source
 	  (condition-case nil
 	      (setq change-log-find-tail
 		    (apply 'change-log-goto-source-1 change-log-find-head))
-	    (error "Cannot find matches for tag `%s' in file `%s'"
-		   tag file))))))))
+	    (error
+	     (format-message "Cannot find matches for tag `%s' in file `%s'"
+			     tag file)))))))))
 
 (defun change-log-next-error (&optional argp reset)
   "Move to the Nth (default 1) next match in a ChangeLog buffer.
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-08 23:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-08 21:03 add-log changes in 5e63c842 Glenn Morris
2016-01-08 23:12 ` Paul Eggert

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.