aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/emulation/viper-cmd.el30
-rw-r--r--lisp/emulation/viper-ex.el2
-rw-r--r--lisp/emulation/viper-init.el1
3 files changed, 17 insertions, 16 deletions
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index f041f25ae9a..f52ce72a6d8 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -1124,7 +1124,7 @@ as a Meta key and any number of multiple escapes are allowed."
1124 ;; it is an error. 1124 ;; it is an error.
1125 (progn 1125 (progn
1126 ;; new com is (CHAR . OLDCOM) 1126 ;; new com is (CHAR . OLDCOM)
1127 (if (viper-memq-char char '(?# ?\")) (error "Viper bell")) 1127 (if (viper-memq-char char '(?# ?\")) (user-error viper-ViperBell))
1128 (setq com (cons char com)) 1128 (setq com (cons char com))
1129 (setq cont nil)) 1129 (setq cont nil))
1130 ;; If com is nil we set com as char, and read more. Again, if char is 1130 ;; If com is nil we set com as char, and read more. Again, if char is
@@ -1143,7 +1143,7 @@ as a Meta key and any number of multiple escapes are allowed."
1143 (let ((reg (read-char))) 1143 (let ((reg (read-char)))
1144 (if (viper-valid-register reg) 1144 (if (viper-valid-register reg)
1145 (setq viper-use-register reg) 1145 (setq viper-use-register reg)
1146 (error "Viper bell")) 1146 (user-error viper-ViperBell))
1147 (setq char (read-char)))) 1147 (setq char (read-char))))
1148 (t 1148 (t
1149 (setq com char) 1149 (setq com char)
@@ -1165,7 +1165,7 @@ as a Meta key and any number of multiple escapes are allowed."
1165 (viper-regsuffix-command-p char) 1165 (viper-regsuffix-command-p char)
1166 (viper= char ?!) ; bang command 1166 (viper= char ?!) ; bang command
1167 (viper= char ?g) ; the gg command (like G0) 1167 (viper= char ?g) ; the gg command (like G0)
1168 (error "Viper bell")) 1168 (user-error viper-ViperBell))
1169 (setq cmd-to-exec-at-end 1169 (setq cmd-to-exec-at-end
1170 (viper-exec-form-in-vi 1170 (viper-exec-form-in-vi
1171 `(key-binding (char-to-string ,char))))) 1171 `(key-binding (char-to-string ,char)))))
@@ -1199,7 +1199,7 @@ as a Meta key and any number of multiple escapes are allowed."
1199 ((equal com '(?= . ?=)) (viper-line (cons value ?=))) 1199 ((equal com '(?= . ?=)) (viper-line (cons value ?=)))
1200 ;; gg acts as G0 1200 ;; gg acts as G0
1201 ((equal (car com) ?g) (viper-goto-line 0)) 1201 ((equal (car com) ?g) (viper-goto-line 0))
1202 (t (error "Viper bell"))))) 1202 (t (user-error viper-ViperBell)))))
1203 1203
1204 (if cmd-to-exec-at-end 1204 (if cmd-to-exec-at-end
1205 (progn 1205 (progn
@@ -2609,9 +2609,9 @@ On reaching end of line, stop and signal error."
2609 ;; the forward motion before the 'viper-execute-com', but, of 2609 ;; the forward motion before the 'viper-execute-com', but, of
2610 ;; course, 'dl' doesn't work on an empty line, so we have to 2610 ;; course, 'dl' doesn't work on an empty line, so we have to
2611 ;; catch that condition before 'viper-execute-com' 2611 ;; catch that condition before 'viper-execute-com'
2612 (if (and (eolp) (bolp)) (error "Viper bell") (forward-char val)) 2612 (if (and (eolp) (bolp)) (user-error viper-ViperBell) (forward-char val))
2613 (if com (viper-execute-com 'viper-forward-char val com)) 2613 (if com (viper-execute-com 'viper-forward-char val com))
2614 (if (eolp) (progn (backward-char 1) (error "Viper bell")))) 2614 (if (eolp) (progn (backward-char 1) (user-error viper-ViperBell))))
2615 (forward-char val) 2615 (forward-char val)
2616 (if com (viper-execute-com 'viper-forward-char val com))))) 2616 (if com (viper-execute-com 'viper-forward-char val com)))))
2617 2617
@@ -2626,7 +2626,7 @@ On reaching beginning of line, stop and signal error."
2626 (if com (viper-move-marker-locally 'viper-com-point (point))) 2626 (if com (viper-move-marker-locally 'viper-com-point (point)))
2627 (if viper-ex-style-motion 2627 (if viper-ex-style-motion
2628 (progn 2628 (progn
2629 (if (bolp) (error "Viper bell") (backward-char val)) 2629 (if (bolp) (user-error viper-ViperBell) (backward-char val))
2630 (if com (viper-execute-com 'viper-backward-char val com))) 2630 (if com (viper-execute-com 'viper-backward-char val com)))
2631 (backward-char val) 2631 (backward-char val)
2632 (if com (viper-execute-com 'viper-backward-char val com))))) 2632 (if com (viper-execute-com 'viper-backward-char val com)))))
@@ -2953,7 +2953,7 @@ On reaching beginning of line, stop and signal error."
2953 (if com (viper-execute-com 'viper-goto-col val com)) 2953 (if com (viper-execute-com 'viper-goto-col val com))
2954 (save-excursion 2954 (save-excursion
2955 (end-of-line) 2955 (end-of-line)
2956 (if (> val (current-column)) (error "Viper bell"))) 2956 (if (> val (current-column)) (user-error viper-ViperBell)))
2957 )) 2957 ))
2958 2958
2959 2959
@@ -3084,7 +3084,7 @@ If point is on a widget or a button, simulate clicking on that widget/button."
3084;; If FORWARD then search is forward, otherwise backward. OFFSET is used to 3084;; If FORWARD then search is forward, otherwise backward. OFFSET is used to
3085;; adjust point after search. 3085;; adjust point after search.
3086(defun viper-find-char (arg char forward offset) 3086(defun viper-find-char (arg char forward offset)
3087 (or (char-or-string-p char) (error "Viper bell")) 3087 (or (char-or-string-p char) (user-error viper-ViperBell))
3088 (let ((arg (if forward arg (- arg))) 3088 (let ((arg (if forward arg (- arg)))
3089 (cmd (if (eq viper-intermediate-command 'viper-repeat) 3089 (cmd (if (eq viper-intermediate-command 'viper-repeat)
3090 (nth 5 viper-d-com) 3090 (nth 5 viper-d-com)
@@ -3424,7 +3424,7 @@ controlled by the sign of prefix numeric value."
3424 (if com (viper-move-marker-locally 'viper-com-point (point))) 3424 (if com (viper-move-marker-locally 'viper-com-point (point)))
3425 (backward-sexp 1) 3425 (backward-sexp 1)
3426 (if com (viper-execute-com 'viper-paren-match nil com))) 3426 (if com (viper-execute-com 'viper-paren-match nil com)))
3427 (t (error "Viper bell")))))) 3427 (t (user-error viper-ViperBell))))))
3428 3428
3429(defun viper-toggle-parse-sexp-ignore-comments () 3429(defun viper-toggle-parse-sexp-ignore-comments ()
3430 (interactive) 3430 (interactive)
@@ -4001,7 +4001,7 @@ Null string will repeat previous search."
4001 (let ((reg viper-use-register)) 4001 (let ((reg viper-use-register))
4002 (setq viper-use-register nil) 4002 (setq viper-use-register nil)
4003 (error viper-EmptyRegister reg)) 4003 (error viper-EmptyRegister reg))
4004 (error "Viper bell"))) 4004 (user-error viper-ViperBell)))
4005 (setq viper-use-register nil) 4005 (setq viper-use-register nil)
4006 (if (viper-end-with-a-newline-p text) 4006 (if (viper-end-with-a-newline-p text)
4007 (progn 4007 (progn
@@ -4051,7 +4051,7 @@ Null string will repeat previous search."
4051 (let ((reg viper-use-register)) 4051 (let ((reg viper-use-register))
4052 (setq viper-use-register nil) 4052 (setq viper-use-register nil)
4053 (error viper-EmptyRegister reg)) 4053 (error viper-EmptyRegister reg))
4054 (error "Viper bell"))) 4054 (user-error viper-ViperBell)))
4055 (setq viper-use-register nil) 4055 (setq viper-use-register nil)
4056 (if (viper-end-with-a-newline-p text) (beginning-of-line)) 4056 (if (viper-end-with-a-newline-p text) (beginning-of-line))
4057 (viper-set-destructive-command 4057 (viper-set-destructive-command
@@ -4096,7 +4096,7 @@ Null string will repeat previous search."
4096 (> val (viper-chars-in-region (point) (viper-line-pos 'end)))) 4096 (> val (viper-chars-in-region (point) (viper-line-pos 'end))))
4097 (setq val (viper-chars-in-region (point) (viper-line-pos 'end)))) 4097 (setq val (viper-chars-in-region (point) (viper-line-pos 'end))))
4098 (if (and viper-ex-style-motion (eolp)) 4098 (if (and viper-ex-style-motion (eolp))
4099 (if (bolp) (error "Viper bell") (setq val 0))) ; not bol---simply back 1 ch 4099 (if (bolp) (user-error viper-ViperBell) (setq val 0))) ; not bol---simply back 1 ch
4100 (save-excursion 4100 (save-excursion
4101 (viper-forward-char-carefully val) 4101 (viper-forward-char-carefully val)
4102 (setq end-del-pos (point))) 4102 (setq end-del-pos (point)))
@@ -4366,7 +4366,7 @@ and regexp replace."
4366 ((viper= char ?,) (viper-cycle-through-mark-ring)) 4366 ((viper= char ?,) (viper-cycle-through-mark-ring))
4367 ((viper= char ?^) (push-mark viper-saved-mark t t)) 4367 ((viper= char ?^) (push-mark viper-saved-mark t t))
4368 ((viper= char ?D) (mark-defun)) 4368 ((viper= char ?D) (mark-defun))
4369 (t (error "Viper bell")) 4369 (t (user-error viper-ViperBell))
4370 ))) 4370 )))
4371 4371
4372;; Algorithm: If first invocation of this command save mark on ring, goto 4372;; Algorithm: If first invocation of this command save mark on ring, goto
@@ -4465,7 +4465,7 @@ One can use \\=`\\=` and \\='\\=' to temporarily jump 1 step back."
4465 (switch-to-buffer buff) 4465 (switch-to-buffer buff)
4466 (goto-char viper-com-point) 4466 (goto-char viper-com-point)
4467 (viper-change-state-to-vi) 4467 (viper-change-state-to-vi)
4468 (error "Viper bell"))))) 4468 (user-error viper-ViperBell)))))
4469 ((and (not skip-white) (viper= char ?`)) 4469 ((and (not skip-white) (viper= char ?`))
4470 (if com (viper-move-marker-locally 'viper-com-point (point))) 4470 (if com (viper-move-marker-locally 'viper-com-point (point)))
4471 (if (and (viper-same-line (point) viper-last-jump) 4471 (if (and (viper-same-line (point) viper-last-jump)
diff --git a/lisp/emulation/viper-ex.el b/lisp/emulation/viper-ex.el
index 4496f1cf7d5..f5090573c86 100644
--- a/lisp/emulation/viper-ex.el
+++ b/lisp/emulation/viper-ex.el
@@ -1240,7 +1240,7 @@ reversed."
1240 (read-string "[Hit return to confirm] ") 1240 (read-string "[Hit return to confirm] ")
1241 (quit 1241 (quit
1242 (save-excursion (kill-buffer " *delete text*")) 1242 (save-excursion (kill-buffer " *delete text*"))
1243 (error "Viper bell"))) 1243 (user-error viper-ViperBell)))
1244 (save-excursion (kill-buffer " *delete text*"))) 1244 (save-excursion (kill-buffer " *delete text*")))
1245 (if ex-buffer 1245 (if ex-buffer
1246 (cond ((viper-valid-register ex-buffer '(Letter)) 1246 (cond ((viper-valid-register ex-buffer '(Letter))
diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el
index 0ad9a7a373c..5a80804e757 100644
--- a/lisp/emulation/viper-init.el
+++ b/lisp/emulation/viper-init.el
@@ -268,6 +268,7 @@ that deletes a file.")
268(defconst viper-BadAddress "Ill-formed address" "") 268(defconst viper-BadAddress "Ill-formed address" "")
269(defconst viper-FirstAddrExceedsSecond "First address exceeds second" "") 269(defconst viper-FirstAddrExceedsSecond "First address exceeds second" "")
270(defconst viper-NoFileSpecified "No file specified" "") 270(defconst viper-NoFileSpecified "No file specified" "")
271(defconst viper-ViperBell "Viper bell" "")
271 272
272;; Is t until viper-mode executes for the very first time. 273;; Is t until viper-mode executes for the very first time.
273;; Prevents recursive descend into startup messages. 274;; Prevents recursive descend into startup messages.