Subject: bug#14480: closed (Re: bug#14480: [PATCH] A few error to user-error replacements)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 28 Feb 2014 02:35:02 +0000

Your bug report

#14480: [PATCH] A few error to user-error replacements

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
14480: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14480
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#14480: [PATCH] A few error to user-error replacements
From: Glenn Morris <[email-masked]>
To: [email-masked]
Date: Thu, 27 Feb 2014 21:34:35 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

Thanks for the user-error patches, but as you know we can't use them
without a copyright assignment. Since we are aware that it is desirable
to replace error by user-eror where applicable, I don't think it is
necessary to keep this bug report open.

Subject: [PATCH] A few error to user-error replacements
From: Kelly Dean <[email-masked]>
To: [email-masked]
Date: Sun, 26 May 2013 18:26:05 -0700 (PDT)
List-Id: <debbugs-submit.debbugs.gnu.org>

I put (setq debug-on-error t) in my init.el recently and started hitting some of these.
Patch attached.
There are over 8000 occurrences "(error" in emacs-24.3/lisp and subdirs, probably a lot that should be replaced; should we report them every time we hit new ones or maybe queue for a few months to avoid spamming the bug db?

--- emacs-24.3/lisp/help-mode.el
+++ emacs-24.3/lisp/help-mode.el
@@ -738,14 +738,14 @@
   (interactive)
   (if help-xref-stack
       (help-xref-go-back (current-buffer))
-    (error "No previous help buffer")))
+    (user-error "No previous help buffer")))
 
 (defun help-go-forward ()
   "Go back to next topic in this help buffer."
   (interactive)
   (if help-xref-forward-stack
       (help-xref-go-forward (current-buffer))
-    (error "No next help buffer")))
+    (user-error "No next help buffer")))
 
 (defun help-do-xref (_pos function args)
   "Call the help cross-reference function FUNCTION with args ARGS.
@@ -768,7 +768,7 @@
 
 For the cross-reference format, see `help-make-xrefs'."
   (interactive)
-  (error "No cross-reference here"))
+  (user-error "No cross-reference here"))
 
 (defun help-follow-symbol (&optional pos)
   "In help buffer, show docs for symbol at POS, defaulting to point.
--- emacs-24.3/lisp/simple.el
+++ emacs-24.3/lisp/simple.el
@@ -3537,7 +3537,7 @@
 doc string for `insert-for-yank-1', which see."
   (interactive "*p")
   (if (not (eq last-command 'yank))
-      (error "Previous command was not a yank"))
+      (user-error "Previous command was not a yank"))
   (setq this-command 'yank)
   (unless arg (setq arg 1))
   (let ((inhibit-read-only t)
@@ -4107,7 +4107,7 @@
 \(Does not affect global mark ring\)."
   (interactive)
   (if (null (mark t))
-      (error "No mark set in this buffer")
+      (user-error "No mark set in this buffer")
     (if (= (point) (mark t))
 	(message "Mark popped"))
     (goto-char (mark t))
@@ -4269,7 +4269,7 @@
   (let ((omark (mark t))
 	(temp-highlight (eq (car-safe transient-mark-mode) 'only)))
     (if (null omark)
-        (error "No mark set in this buffer"))
+        (user-error "No mark set in this buffer"))
     (deactivate-mark)
     (set-mark (point))
     (goto-char omark)