Commit 71873e2b authored by Stefan Monnier's avatar Stefan Monnier

Add new error and function `user-error'.

* lisp/subr.el (user-error): New function.
* lisp/window.el (switch-to-buffer):
* lisp/vc/smerge-mode.el (smerge-resolve-function, smerge-resolve)
(smerge-match-conflict):
* lisp/simple.el (previous-matching-history-element)
(next-matching-history-element, goto-history-element, undo-more)
(undo-start):
* lisp/progmodes/etags.el (visit-tags-table-buffer, find-tag-tag)
(find-tag-noselect, find-tag-in-order, etags-goto-tag-location)
(next-file, tags-loop-scan, list-tags, complete-tag):
* lisp/progmodes/compile.el (compilation-loop):
* lisp/mouse.el (mouse-minibuffer-check):
* lisp/man.el (Man-bgproc-sentinel, Man-goto-page):
* lisp/info.el (Info-find-node-2, Info-extract-pointer, Info-history-back)
(Info-history-forward, Info-follow-reference, Info-menu)
(Info-extract-menu-item, Info-extract-menu-counting)
(Info-forward-node, Info-backward-node, Info-next-menu-item)
(Info-last-menu-item, Info-next-preorder, Info-last-preorder)
(Info-next-reference, Info-prev-reference, Info-index)
(Info-index-next, Info-follow-nearest-node)
(Info-copy-current-node-name):
* lisp/imenu.el (imenu--make-index-alist)
(imenu-default-create-index-function, imenu-add-to-menubar):
* lisp/files.el (basic-save-buffer, recover-file):
* lisp/emacs-lisp/easy-mmode.el (easy-mmode-define-navigation):
* lisp/emacs-lisp/checkdoc.el (checkdoc-continue, checkdoc-comments)
(checkdoc-message-text, checkdoc-defun):
* lisp/dabbrev.el (dabbrev-completion, dabbrev--abbrev-at-point):
* lisp/cus-edit.el (customize-changed-options, customize-rogue)
(customize-saved, custom-variable-set, custom-variable-mark-to-save)
(custom-variable-mark-to-reset-standard)
(custom-variable-reset-backup, custom-face-mark-to-reset-standard)
(custom-file):
* lisp/completion.el (check-completion-length):
* lisp/comint.el (comint-search-arg)
(comint-previous-matching-input-string-position)
(comint-previous-matching-input)
(comint-replace-by-expanded-history-before-point, comint-send-input)
(comint-copy-old-input, comint-backward-matching-input)
(comint-goto-process-mark, comint-set-process-mark):
* lisp/calendar/calendar.el (calendar-cursor-to-date): Use it.
* lisp/bindings.el (debug-ignored-errors): Remove regexps, add `user-error'.
* src/data.c (PUT_ERROR): New macro.
(syms_of_data): Use it.  Add new error type `user-error'.
* src/undo.c (user_error): New function.
(Fprimitive_undo): Use it.
* src/print.c (print_error_message): Adjust print style for `user-error'.
* src/keyboard.c (user_error): New function.
(Fexit_recursive_edit, Fabort_recursive_edit): Use it.
parent 956cceb9
...@@ -438,7 +438,7 @@ ...@@ -438,7 +438,7 @@
2012-01-09 Chong Yidong <cyd@gnu.org> 2012-01-09 Chong Yidong <cyd@gnu.org>
* custom.texi (Custom Themes): Switched custom-safe-themes to use * custom.texi (Custom Themes): Switch custom-safe-themes to use
SHA-256. SHA-256.
2012-01-07 Chong Yidong <cyd@gnu.org> 2012-01-07 Chong Yidong <cyd@gnu.org>
...@@ -455,8 +455,8 @@ ...@@ -455,8 +455,8 @@
(Screen Garbled): Don't refer to terminal "manufacturers". (Screen Garbled): Don't refer to terminal "manufacturers".
(Total Frustration): Node deleted. Eliza is documented in (Total Frustration): Node deleted. Eliza is documented in
Amusements now. Amusements now.
(Known Problems): More info about using the bug tracker. Mention (Known Problems): More info about using the bug tracker.
debbugs package. Mention debbugs package.
(Bug Criteria): Copyedits. (Bug Criteria): Copyedits.
(Understanding Bug Reporting): Mention emacs -Q. (Understanding Bug Reporting): Mention emacs -Q.
...@@ -519,8 +519,8 @@ ...@@ -519,8 +519,8 @@
Document browse-url-mailto-function. Document browse-url-mailto-function.
(Goto Address mode): Add index entries. Add xref to Browse-URL. (Goto Address mode): Add index entries. Add xref to Browse-URL.
(FFAP): FFAP is not a minor mode. (FFAP): FFAP is not a minor mode.
(Amusements): M-x lm was renamed to M-x landmark. Document (Amusements): M-x lm was renamed to M-x landmark.
nato-region. Document nato-region.
2012-01-01 Chong Yidong <cyd@gnu.org> 2012-01-01 Chong Yidong <cyd@gnu.org>
...@@ -558,8 +558,8 @@ ...@@ -558,8 +558,8 @@
2011-12-26 Chong Yidong <cyd@gnu.org> 2011-12-26 Chong Yidong <cyd@gnu.org>
* dired.texi (Dired Enter, Misc Dired Features): Document * dired.texi (Dired Enter, Misc Dired Features):
dired-use-ls-dired changes. Mention quit-window. Document dired-use-ls-dired changes. Mention quit-window.
(Dired Navigation): Add index entries. (Dired Navigation): Add index entries.
(Dired Visiting): Fix View Mode xref. (Dired Visiting): Fix View Mode xref.
(Marks vs Flags): Prefer C-/ binding for undo. (Marks vs Flags): Prefer C-/ binding for undo.
...@@ -602,8 +602,8 @@ ...@@ -602,8 +602,8 @@
* vc1-xtra.texi (Version Headers): Note that these are for * vc1-xtra.texi (Version Headers): Note that these are for
Subversion, CVS, etc. only. Subversion, CVS, etc. only.
(General VC Options): De-document vc-keep-workfiles. Fix (General VC Options): De-document vc-keep-workfiles.
RCS-isms. Fix RCS-isms.
2011-12-22 Eli Zaretskii <eliz@gnu.org> 2011-12-22 Eli Zaretskii <eliz@gnu.org>
...@@ -619,8 +619,8 @@ ...@@ -619,8 +619,8 @@
* vc1-xtra.texi (Remote Repositories): Update introduction. * vc1-xtra.texi (Remote Repositories): Update introduction.
(Local Version Control): Node deleted (obsolete with DVCSes). (Local Version Control): Node deleted (obsolete with DVCSes).
(Remote Repositories, Version Backups): Node deleted. Move (Remote Repositories, Version Backups): Node deleted.
documentation of vc-cvs-stay-local to CVS Options. Move documentation of vc-cvs-stay-local to CVS Options.
(CVS Options): Reduce verbosity of description of obscure CVS (CVS Options): Reduce verbosity of description of obscure CVS
locking feature. locking feature.
(Making Revision Tags, Revision Tag Caveats): Merge into Revision (Making Revision Tags, Revision Tag Caveats): Merge into Revision
...@@ -673,11 +673,11 @@ ...@@ -673,11 +673,11 @@
less CVS-specific. less CVS-specific.
(VC With A Merging VCS, VC With A Locking VCS): Add xref to (VC With A Merging VCS, VC With A Locking VCS): Add xref to
Registering node. Registering node.
(Secondary VC Commands): Deleted. Promote subnodes. (Secondary VC Commands): Delete. Promote subnodes.
(Log Buffer): Add command name for C-c C-c. Fix the name of the (Log Buffer): Add command name for C-c C-c. Fix the name of the
log buffer. Add index entries. log buffer. Add index entries.
(VCS Changesets, Types of Log File, VC With A Merging VCS): Use (VCS Changesets, Types of Log File, VC With A Merging VCS):
"commit" terminology. Use "commit" terminology.
(Old Revisions): Move it to just before VC Change Log. "Tag" here (Old Revisions): Move it to just before VC Change Log. "Tag" here
doesn't refer to tags tables. Note other possible forms of the doesn't refer to tags tables. Note other possible forms of the
revision ID. C-x v = does not save. revision ID. C-x v = does not save.
...@@ -702,8 +702,8 @@ ...@@ -702,8 +702,8 @@
(Lisp Eval): Note that listed commands are available globally. (Lisp Eval): Note that listed commands are available globally.
Explain the meaning of "defun" in the C-M-x context. Explain the meaning of "defun" in the C-M-x context.
(Lisp Interaction): Copyedits. (Lisp Interaction): Copyedits.
(External Lisp): Fix name of inferior Lisp buffer. Mention (External Lisp): Fix name of inferior Lisp buffer.
Scheme. Mention Scheme.
(Compilation): Define "inferior process". (Compilation): Define "inferior process".
2011-12-10 Eli Zaretskii <eliz@gnu.org> 2011-12-10 Eli Zaretskii <eliz@gnu.org>
...@@ -718,8 +718,8 @@ ...@@ -718,8 +718,8 @@
(Compilation Mode): Add xref for grep, occur, and mouse (Compilation Mode): Add xref for grep, occur, and mouse
references. Define "locus". references. Define "locus".
(Grep Searching): Use @command. (Grep Searching): Use @command.
(Debuggers, Commands of GUD, GDB Graphical Interface): Clarify (Debuggers, Commands of GUD, GDB Graphical Interface):
intro. Clarify intro.
(Starting GUD): Clarify how arguments are specified. (Starting GUD): Clarify how arguments are specified.
(Debugger Operation): Index entry for "GUD interaction buffer", (Debugger Operation): Index entry for "GUD interaction buffer",
and move basic description here from Commands of GUD node. and move basic description here from Commands of GUD node.
...@@ -727,8 +727,8 @@ ...@@ -727,8 +727,8 @@
(Source Buffers): Remove gdb-find-source-frame, which is not in (Source Buffers): Remove gdb-find-source-frame, which is not in
gdb-mi.el. gdb-mi.el.
(Other GDB Buffers): Remove gdb-use-separate-io-buffer and (Other GDB Buffers): Remove gdb-use-separate-io-buffer and
toggle-gdb-all-registers, which are not in gdb-mi.el. Don't toggle-gdb-all-registers, which are not in gdb-mi.el.
re-document GUD interaction buffers. Don't re-document GUD interaction buffers.
* programs.texi (Symbol Completion): M-TAB can now use Semantic. * programs.texi (Symbol Completion): M-TAB can now use Semantic.
(Semantic): Add cindex entries for Semantic. (Semantic): Add cindex entries for Semantic.
...@@ -758,8 +758,8 @@ ...@@ -758,8 +758,8 @@
* programs.texi (Program Modes): Mention modes that are not * programs.texi (Program Modes): Mention modes that are not
included with Emacs. Fix references to other manuals for tex. included with Emacs. Fix references to other manuals for tex.
Add index entry for backward-delete-char-untabify. Mention Add index entry for backward-delete-char-untabify.
prog-mode-hook. Mention prog-mode-hook.
(Which Function): Use "global minor mode" terminology. (Which Function): Use "global minor mode" terminology.
(Basic Indent, Multi-line Indent): Refer to previous descriptions (Basic Indent, Multi-line Indent): Refer to previous descriptions
in Indentation chapter to avoid duplication. in Indentation chapter to avoid duplication.
...@@ -791,12 +791,12 @@ ...@@ -791,12 +791,12 @@
(TeX Editing): Add xref to documentation for Occur. (TeX Editing): Add xref to documentation for Occur.
(LaTeX Editing): Add xref to Completion node. (LaTeX Editing): Add xref to Completion node.
(TeX Print): Fix description of tex-directory. (TeX Print): Fix description of tex-directory.
(Enriched Text): Renamed from Formatted Text. Make this node and (Enriched Text): Rename from Formatted Text. Make this node and
its subnodes less verbose, since text/enriched files are its subnodes less verbose, since text/enriched files are
practically unused. practically unused.
(Enriched Mode): Renamed from Requesting Formatted Text. (Enriched Mode): Rename from Requesting Formatted Text.
(Format Colors): Node deleted. (Format Colors): Node deleted.
(Enriched Faces): Renamed from Format Faces. Describe commands (Enriched Faces): Rename from Format Faces. Describe commands
for applying colors too. for applying colors too.
(Forcing Enriched Mode): Node deleted; merged into Enriched Mode. (Forcing Enriched Mode): Node deleted; merged into Enriched Mode.
...@@ -1031,12 +1031,12 @@ ...@@ -1031,12 +1031,12 @@
2011-10-18 Chong Yidong <cyd@gnu.org> 2011-10-18 Chong Yidong <cyd@gnu.org>
* display.texi (Faces): Simplify discussion. Move documentation * display.texi (Faces): Simplify discussion. Move documentation
of list-faces-display here, from Standard Faces node. Note of list-faces-display here, from Standard Faces node.
special role of `default' background. Note special role of `default' background.
(Standard Faces): Note special role of `default' background. Note (Standard Faces): Note special role of `default' background.
that region face may be taken fom GTK. Add xref to Text Display. Note that region face may be taken fom GTK. Add xref to Text Display.
(Text Scale): Rename from "Temporary Face Changes". Callers (Text Scale): Rename from "Temporary Face Changes".
changed. Don't bother documenting variable-pitch-mode. Callers changed. Don't bother documenting variable-pitch-mode.
(Font Lock): Copyedits. Remove font-lock-maximum-size. (Font Lock): Copyedits. Remove font-lock-maximum-size.
(Useless Whitespace): Simplify description of (Useless Whitespace): Simplify description of
delete-trailing-whitespace. Note active region case. delete-trailing-whitespace. Note active region case.
...@@ -1058,8 +1058,8 @@ ...@@ -1058,8 +1058,8 @@
2011-10-13 Chong Yidong <cyd@stupidchicken.com> 2011-10-13 Chong Yidong <cyd@stupidchicken.com>
* killing.texi (Deletion): Add xref to Using Region. Document * killing.texi (Deletion): Add xref to Using Region.
delete-forward-char. Document delete-forward-char.
(Yanking): Move yank-excluded-properties to Lisp manual. Move C-y (Yanking): Move yank-excluded-properties to Lisp manual. Move C-y
description here. Recommend C-u C-SPC for jumping to mark. description here. Recommend C-u C-SPC for jumping to mark.
(Kill Ring): Move kill ring variable documentation here. (Kill Ring): Move kill ring variable documentation here.
...@@ -1079,10 +1079,10 @@ ...@@ -1079,10 +1079,10 @@
selection changes. Mention that commands like C-y set the mark. selection changes. Mention that commands like C-y set the mark.
(Marking Objects): Add xref to Words node. Note that mark-word (Marking Objects): Add xref to Words node. Note that mark-word
and mark-sexp also have the "extend region" behavior. and mark-sexp also have the "extend region" behavior.
(Using Region): Mention M-$ in the table. Document (Using Region): Mention M-$ in the table.
mark-even-if-inactive here instead of in Mark Ring. Document mark-even-if-inactive here instead of in Mark Ring.
(Mark Ring): Move mark-even-if-inactive to Using Region. Take (Mark Ring): Move mark-even-if-inactive to Using Region.
note of the "Mark Set" behavior. Take note of the "Mark Set" behavior.
(Disabled Transient Mark): Rename from "Persistent Mark" (Disabled Transient Mark): Rename from "Persistent Mark"
(Bug#9688). Callers changed. (Bug#9688). Callers changed.
...@@ -1097,8 +1097,8 @@ ...@@ -1097,8 +1097,8 @@
(Name Help): Remove an over-long joke. (Name Help): Remove an over-long joke.
(Apropos): Document prefix args. Remove duplicated descriptions. (Apropos): Document prefix args. Remove duplicated descriptions.
(Help Mode): Add C-c C-b to table. Update TAB binding. (Help Mode): Add C-c C-b to table. Update TAB binding.
(Package Keywords): Rename from "Library by Keyword". Describe (Package Keywords): Rename from "Library by Keyword".
new package menu interface. Describe new package menu interface.
(Help Files, Help Echo): Tweak description. (Help Files, Help Echo): Tweak description.
* mini.texi (Completion Options): Add completion-cycle-threshold. * mini.texi (Completion Options): Add completion-cycle-threshold.
...@@ -1110,8 +1110,8 @@ ...@@ -1110,8 +1110,8 @@
2011-10-08 Chong Yidong <cyd@stupidchicken.com> 2011-10-08 Chong Yidong <cyd@stupidchicken.com>
* basic.texi (Position Info): Omit page commands. Document * basic.texi (Position Info): Omit page commands.
count-words-region and count-words. Document count-words-region and count-words.
* text.texi (Pages): Move what-page documentation here. * text.texi (Pages): Move what-page documentation here.
...@@ -1134,8 +1134,8 @@ ...@@ -1134,8 +1134,8 @@
2011-10-07 Chong Yidong <cyd@stupidchicken.com> 2011-10-07 Chong Yidong <cyd@stupidchicken.com>
* basic.texi (Inserting Text): Add xref to Completion. Add * basic.texi (Inserting Text): Add xref to Completion.
ucs-insert example, and document prefix argument. Add ucs-insert example, and document prefix argument.
(Moving Point): Fix introduction; C-f/C-b are no longer equivalent (Moving Point): Fix introduction; C-f/C-b are no longer equivalent
to left/right. Tweak left-char and right-char descriptions. to left/right. Tweak left-char and right-char descriptions.
M-left and M-right are now bound to left-word/right-word. M-left and M-right are now bound to left-word/right-word.
...@@ -1539,8 +1539,8 @@ ...@@ -1539,8 +1539,8 @@
2011-04-24 Chong Yidong <cyd@stupidchicken.com> 2011-04-24 Chong Yidong <cyd@stupidchicken.com>
* maintaining.texi (List Tags): Document next-file. Suggested by * maintaining.texi (List Tags): Document next-file.
Uday S Reddy. Suggested by Uday S Reddy.
2011-04-23 Juanma Barranquero <lekktu@gmail.com> 2011-04-23 Juanma Barranquero <lekktu@gmail.com>
......
...@@ -199,6 +199,7 @@ still be supported for Emacs 24.x. ...@@ -199,6 +199,7 @@ still be supported for Emacs 24.x.
* Lisp changes in Emacs 24.2 * Lisp changes in Emacs 24.2
** New error type and new function `user-error'. Doesn't trigger the debugger.
** Completion ** Completion
*** New function `completion-table-with-quoting' to handle completion *** New function `completion-table-with-quoting' to handle completion
......
2012-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
* subr.el (user-error): New function.
* window.el (switch-to-buffer):
* vc/smerge-mode.el (smerge-resolve-function, smerge-resolve)
(smerge-match-conflict):
* simple.el (previous-matching-history-element)
(next-matching-history-element, goto-history-element, undo-more)
(undo-start):
* progmodes/etags.el (visit-tags-table-buffer, find-tag-tag)
(find-tag-noselect, find-tag-in-order, etags-goto-tag-location)
(next-file, tags-loop-scan, list-tags, complete-tag):
* progmodes/compile.el (compilation-loop):
* mouse.el (mouse-minibuffer-check):
* man.el (Man-bgproc-sentinel, Man-goto-page):
* info.el (Info-find-node-2, Info-extract-pointer, Info-history-back)
(Info-history-forward, Info-follow-reference, Info-menu)
(Info-extract-menu-item, Info-extract-menu-counting)
(Info-forward-node, Info-backward-node, Info-next-menu-item)
(Info-last-menu-item, Info-next-preorder, Info-last-preorder)
(Info-next-reference, Info-prev-reference, Info-index)
(Info-index-next, Info-follow-nearest-node)
(Info-copy-current-node-name):
* imenu.el (imenu--make-index-alist)
(imenu-default-create-index-function, imenu-add-to-menubar):
* files.el (basic-save-buffer, recover-file):
* emacs-lisp/easy-mmode.el (easy-mmode-define-navigation):
* emacs-lisp/checkdoc.el (checkdoc-continue, checkdoc-comments)
(checkdoc-message-text, checkdoc-defun):
* dabbrev.el (dabbrev-completion, dabbrev--abbrev-at-point):
* cus-edit.el (customize-changed-options, customize-rogue)
(customize-saved, custom-variable-set, custom-variable-mark-to-save)
(custom-variable-mark-to-reset-standard)
(custom-variable-reset-backup, custom-face-mark-to-reset-standard)
(custom-file):
* completion.el (check-completion-length):
* comint.el (comint-search-arg)
(comint-previous-matching-input-string-position)
(comint-previous-matching-input)
(comint-replace-by-expanded-history-before-point, comint-send-input)
(comint-copy-old-input, comint-backward-matching-input)
(comint-goto-process-mark, comint-set-process-mark):
* calendar/calendar.el (calendar-cursor-to-date): Use it.
* bindings.el (debug-ignored-errors): Remove regexps, add `user-error'.
2012-05-04 Stefan Monnier <monnier@iro.umontreal.ca> 2012-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
* dabbrev.el (dabbrev--ignore-case-p): New function. * dabbrev.el (dabbrev--ignore-case-p): New function.
......
...@@ -623,24 +623,13 @@ is okay. See `mode-line-format'.") ...@@ -623,24 +623,13 @@ is okay. See `mode-line-format'.")
;; Packages should add to this list appropriately when they are ;; Packages should add to this list appropriately when they are
;; loaded, rather than listing everything here. ;; loaded, rather than listing everything here.
(setq debug-ignored-errors (setq debug-ignored-errors
;; FIXME: Maybe beginning-of-line, beginning-of-buffer, end-of-line,
;; end-of-buffer, end-of-file, buffer-read-only, and
;; file-supersession should all be user-errors!
`(beginning-of-line beginning-of-buffer end-of-line `(beginning-of-line beginning-of-buffer end-of-line
end-of-buffer end-of-file buffer-read-only end-of-buffer end-of-file buffer-read-only
file-supersession file-supersession
,(purecopy "^Previous command was not a yank$") user-error ;; That's the main one!
,(purecopy "^Minibuffer window is not active$")
,(purecopy "^No previous history search regexp$")
,(purecopy "^No later matching history item$")
,(purecopy "^No earlier matching history item$")
,(purecopy "^End of history; no default available$")
,(purecopy "^End of defaults; no next item$")
,(purecopy "^Beginning of history; no preceding item$")
,(purecopy "^No recursive edit is in progress$")
,(purecopy "^Changes to be undone are outside visible portion of buffer$")
,(purecopy "^No undo information in this buffer$")
,(purecopy "^No further undo information")
,(purecopy "^Save not confirmed$")
,(purecopy "^Recover-file cancelled\\.$")
,(purecopy "^Cannot switch buffers in a dedicated window$")
)) ))
......
...@@ -1888,7 +1888,7 @@ use instead of point." ...@@ -1888,7 +1888,7 @@ use instead of point."
;; or on or before the digit of a 1-digit date. ;; or on or before the digit of a 1-digit date.
(if (not (and (looking-at "[ 0-9]?[0-9][^0-9]") (if (not (and (looking-at "[ 0-9]?[0-9][^0-9]")
(get-text-property (point) 'date))) (get-text-property (point) 'date)))
(if error (error "Not on a date!")) (if error (user-error "Not on a date!"))
;; Convert segment to real month and year. ;; Convert segment to real month and year.
(if (zerop month) (setq month 12)) (if (zerop month) (setq month 12))
;; Go back to before the first date digit. ;; Go back to before the first date digit.
...@@ -1903,8 +1903,6 @@ use instead of point." ...@@ -1903,8 +1903,6 @@ use instead of point."
((and (= 1 month) (= segment 2)) (1+ displayed-year)) ((and (= 1 month) (= segment 2)) (1+ displayed-year))
(t displayed-year)))))))) (t displayed-year))))))))
(add-to-list 'debug-ignored-errors "Not on a date!")
;; The following version of calendar-gregorian-from-absolute is preferred for ;; The following version of calendar-gregorian-from-absolute is preferred for
;; reasons of clarity, BUT it's much slower than the version that follows it. ;; reasons of clarity, BUT it's much slower than the version that follows it.
......
...@@ -1076,10 +1076,10 @@ See also `comint-read-input-ring'." ...@@ -1076,10 +1076,10 @@ See also `comint-read-input-ring'."
(defun comint-search-arg (arg) (defun comint-search-arg (arg)
;; First make sure there is a ring and that we are after the process mark ;; First make sure there is a ring and that we are after the process mark
(cond ((not (comint-after-pmark-p)) (cond ((not (comint-after-pmark-p))
(error "Not at command line")) (user-error "Not at command line"))
((or (null comint-input-ring) ((or (null comint-input-ring)
(ring-empty-p comint-input-ring)) (ring-empty-p comint-input-ring))
(error "Empty input ring")) (user-error "Empty input ring"))
((zerop arg) ((zerop arg)
;; arg of zero resets search from beginning, and uses arg of 1 ;; arg of zero resets search from beginning, and uses arg of 1
(setq comint-input-ring-index nil) (setq comint-input-ring-index nil)
...@@ -1146,7 +1146,7 @@ Moves relative to `comint-input-ring-index'." ...@@ -1146,7 +1146,7 @@ Moves relative to `comint-input-ring-index'."
Moves relative to START, or `comint-input-ring-index'." Moves relative to START, or `comint-input-ring-index'."
(if (or (not (ring-p comint-input-ring)) (if (or (not (ring-p comint-input-ring))
(ring-empty-p comint-input-ring)) (ring-empty-p comint-input-ring))
(error "No history")) (user-error "No history"))
(let* ((len (ring-length comint-input-ring)) (let* ((len (ring-length comint-input-ring))
(motion (if (> arg 0) 1 -1)) (motion (if (> arg 0) 1 -1))
(n (mod (- (or start (comint-search-start arg)) motion) len)) (n (mod (- (or start (comint-search-start arg)) motion) len))
...@@ -1186,7 +1186,7 @@ If N is negative, find the next or Nth next match." ...@@ -1186,7 +1186,7 @@ If N is negative, find the next or Nth next match."
(let ((pos (comint-previous-matching-input-string-position regexp n))) (let ((pos (comint-previous-matching-input-string-position regexp n)))
;; Has a match been found? ;; Has a match been found?
(if (null pos) (if (null pos)
(error "Not found") (user-error "Not found")
;; If leaving the edit line, save partial input ;; If leaving the edit line, save partial input
(if (null comint-input-ring-index) ;not yet on ring (if (null comint-input-ring-index) ;not yet on ring
(setq comint-stored-incomplete-input (setq comint-stored-incomplete-input
...@@ -1372,7 +1372,7 @@ actual side-effect." ...@@ -1372,7 +1372,7 @@ actual side-effect."
(goto-char (match-beginning 0)) (goto-char (match-beginning 0))
(if (not (search-forward old pos t)) (if (not (search-forward old pos t))
(or silent (or silent
(error "Not found")) (user-error "Not found"))
(replace-match new t t) (replace-match new t t)
(message "History item: substituted")))) (message "History item: substituted"))))
(t (t
...@@ -1777,7 +1777,7 @@ Similarly for Soar, Scheme, etc." ...@@ -1777,7 +1777,7 @@ Similarly for Soar, Scheme, etc."
(interactive) (interactive)
;; Note that the input string does not include its terminal newline. ;; Note that the input string does not include its terminal newline.
(let ((proc (get-buffer-process (current-buffer)))) (let ((proc (get-buffer-process (current-buffer))))
(if (not proc) (error "Current buffer has no process") (if (not proc) (user-error "Current buffer has no process")
(widen) (widen)
(let* ((pmark (process-mark proc)) (let* ((pmark (process-mark proc))
(intxt (if (>= (point) (marker-position pmark)) (intxt (if (>= (point) (marker-position pmark))
...@@ -2201,7 +2201,7 @@ Calls `comint-get-old-input' to get old input." ...@@ -2201,7 +2201,7 @@ Calls `comint-get-old-input' to get old input."
(let ((input (funcall comint-get-old-input)) (let ((input (funcall comint-get-old-input))
(process (get-buffer-process (current-buffer)))) (process (get-buffer-process (current-buffer))))
(if (not process) (if (not process)
(error "Current buffer has no process") (user-error "Current buffer has no process")
(goto-char (process-mark process)) (goto-char (process-mark process))
(insert input)))) (insert input))))
...@@ -2508,7 +2508,7 @@ If N is negative, find the next or Nth next match." ...@@ -2508,7 +2508,7 @@ If N is negative, find the next or Nth next match."
(save-excursion (save-excursion
(while (/= n 0) (while (/= n 0)
(unless (re-search-backward regexp nil t dir) (unless (re-search-backward regexp nil t dir)
(error "Not found")) (user-error "Not found"))
(unless (get-char-property (point) 'field) (unless (get-char-property (point) 'field)
(setq n (- n dir)))) (setq n (- n dir))))
(field-beginning)))) (field-beginning))))
...@@ -3364,7 +3364,7 @@ The process mark separates output, and input already sent, ...@@ -3364,7 +3364,7 @@ The process mark separates output, and input already sent,
from input that has not yet been sent." from input that has not yet been sent."
(interactive) (interactive)
(let ((proc (or (get-buffer-process (current-buffer)) (let ((proc (or (get-buffer-process (current-buffer))
(error "Current buffer has no process")))) (user-error "Current buffer has no process"))))
(goto-char (process-mark proc)) (goto-char (process-mark proc))
(when (called-interactively-p 'interactive) (when (called-interactively-p 'interactive)
(message "Point is now at the process mark")))) (message "Point is now at the process mark"))))
...@@ -3389,7 +3389,7 @@ the process mark is at the beginning of the accumulated input." ...@@ -3389,7 +3389,7 @@ the process mark is at the beginning of the accumulated input."
"Set the process mark at point." "Set the process mark at point."
(interactive) (interactive)
(let ((proc (or (get-buffer-process (current-buffer)) (let ((proc (or (get-buffer-process (current-buffer))
(error "Current buffer has no process")))) (user-error "Current buffer has no process"))))
(set-marker (process-mark proc) (point)) (set-marker (process-mark proc) (point))
(message "Process mark set"))) (message "Process mark set")))
...@@ -3741,14 +3741,6 @@ REGEXP-GROUP is the regular expression group in REGEXP to use." ...@@ -3741,14 +3741,6 @@ REGEXP-GROUP is the regular expression group in REGEXP to use."
(match-end regexp-group)) (match-end regexp-group))
results)) results))
results))) results)))
(dolist (x '("^Not at command line$"
"^Empty input ring$"
"^No history$"
"^Not found$" ; Too common?
"^Current buffer has no process$"))
(add-to-list 'debug-ignored-errors x))
;; Converting process modes to use comint mode ;; Converting process modes to use comint mode
;; =========================================================================== ;; ===========================================================================
......
...@@ -1301,8 +1301,8 @@ String must be longer than `completion-prefix-min-length'." ...@@ -1301,8 +1301,8 @@ String must be longer than `completion-prefix-min-length'."
(defun check-completion-length (string) (defun check-completion-length (string)
(if (< (length string) completion-min-length) (if (< (length string) completion-min-length)
(error "The string `%s' is too short to be saved as a completion" (user-error "The string `%s' is too short to be saved as a completion"
string) string)
(list string))) (list string)))
(defun add-completion (string &optional num-uses last-use-time) (defun add-completion (string &optional num-uses last-use-time)
...@@ -2467,10 +2467,6 @@ if ARG is omitted or nil." ...@@ -2467,10 +2467,6 @@ if ARG is omitted or nil."
(defvaralias 'cmpl-syntax-table 'completion-syntax-table) (defvaralias 'cmpl-syntax-table 'completion-syntax-table)
(defalias 'initialize-completions 'completion-initialize) (defalias 'initialize-completions 'completion-initialize)
(dolist (x '("^To complete, the point must be after a symbol at least [0-9]* character long\\.$"
"^The string \".*\" is too short to be saved as a completion\\.$"))
(add-to-list 'debug-ignored-errors x))
(provide 'completion) (provide 'completion)
;;; completion.el ends here ;;; completion.el ends here
...@@ -1254,8 +1254,8 @@ that were added or redefined since that version." ...@@ -1254,8 +1254,8 @@ that were added or redefined since that version."
(if found (if found
(custom-buffer-create (custom-sort-items found t 'first) (custom-buffer-create (custom-sort-items found t 'first)
"*Customize Changed Options*") "*Customize Changed Options*")
(error "No user option defaults have been changed since Emacs %s" (user-error "No user option defaults have been changed since Emacs %s"
since-version)))) since-version))))
(defun customize-package-emacs-version (symbol package-version) (defun customize-package-emacs-version (symbol package-version)
"Return the Emacs version in which SYMBOL's meaning last changed. "Return the Emacs version in which SYMBOL's meaning last changed.
...@@ -1386,7 +1386,7 @@ suggest to customize that face, if it's customizable." ...@@ -1386,7 +1386,7 @@ suggest to customize that face, if it's customizable."
(default-value symbol)))) (default-value symbol))))
(push (list symbol 'custom-variable) found))))) (push (list symbol 'custom-variable) found)))))
(if (not found) (if (not found)
(error "No rogue user options") (user-error "No rogue user options")
(custom-buffer-create (custom-sort-items found t nil)