all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#14480: [PATCH] A few error to user-error replacements
@ 2013-05-27  1:26 Kelly Dean
  2013-06-04  0:35 ` bug#14480: [PATCH2] Re: bug#14480: " Kelly Dean
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Kelly Dean @ 2013-05-27  1:26 UTC (permalink / raw)
  To: 14480

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

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?

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: user-error.patch --]
[-- Type: text/x-diff; name="user-error.patch", Size: 1877 bytes --]

--- 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)

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

end of thread, other threads:[~2014-02-28  2:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-27  1:26 bug#14480: [PATCH] A few error to user-error replacements Kelly Dean
2013-06-04  0:35 ` bug#14480: [PATCH2] Re: bug#14480: " Kelly Dean
2013-06-12  0:52 ` bug#14480: [PATCH3] " Kelly Dean
2013-06-12 13:49 ` Kelly Dean
2014-02-28  2:34 ` bug#14480: [PATCH] " Glenn Morris

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.