aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/emulation
diff options
context:
space:
mode:
authorStefan Monnier2019-06-26 10:03:48 -0400
committerStefan Monnier2019-06-26 10:03:48 -0400
commit698ff554ac2699ec48fefc85a1307cbc4a183b0d (patch)
treea7b7592f7973f81cad4410366d313e790616907e /lisp/emulation
parent9233865b7005831e63755eb84ae7da060f878a55 (diff)
downloademacs-698ff554ac2699ec48fefc85a1307cbc4a183b0d.tar.gz
emacs-698ff554ac2699ec48fefc85a1307cbc4a183b0d.zip
* lisp/calc/calc-ext.el (math-scalarp): Fix typo
Diffstat (limited to 'lisp/emulation')
-rw-r--r--lisp/emulation/viper-cmd.el120
-rw-r--r--lisp/emulation/viper-ex.el2
-rw-r--r--lisp/emulation/viper-util.el2
3 files changed, 64 insertions, 60 deletions
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index bdb205ce7c8..e7c737d85ab 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -293,15 +293,15 @@
293 ;; desirable that viper-pre-command-sentinel is the last hook and 293 ;; desirable that viper-pre-command-sentinel is the last hook and
294 ;; viper-post-command-sentinel is the first hook. 294 ;; viper-post-command-sentinel is the first hook.
295 295
296 (remove-hook 'post-command-hook 'viper-post-command-sentinel) 296 (remove-hook 'post-command-hook #'viper-post-command-sentinel)
297 (add-hook 'post-command-hook 'viper-post-command-sentinel) 297 (add-hook 'post-command-hook #'viper-post-command-sentinel)
298 (remove-hook 'pre-command-hook 'viper-pre-command-sentinel) 298 (remove-hook 'pre-command-hook #'viper-pre-command-sentinel)
299 (add-hook 'pre-command-hook 'viper-pre-command-sentinel t) 299 (add-hook 'pre-command-hook #'viper-pre-command-sentinel t)
300 ;; These hooks will be added back if switching to insert/replace mode 300 ;; These hooks will be added back if switching to insert/replace mode
301 (remove-hook 'viper-post-command-hooks 301 (remove-hook 'viper-post-command-hooks
302 'viper-insert-state-post-command-sentinel 'local) 302 #'viper-insert-state-post-command-sentinel 'local)
303 (remove-hook 'viper-pre-command-hooks 303 (remove-hook 'viper-pre-command-hooks
304 'viper-insert-state-pre-command-sentinel 'local) 304 #'viper-insert-state-pre-command-sentinel 'local)
305 (setq viper-intermediate-command nil) 305 (setq viper-intermediate-command nil)
306 (cond ((eq new-state 'vi-state) 306 (cond ((eq new-state 'vi-state)
307 (cond ((member viper-current-state '(insert-state replace-state)) 307 (cond ((member viper-current-state '(insert-state replace-state))
@@ -344,9 +344,9 @@
344 (viper-move-marker-locally 344 (viper-move-marker-locally
345 'viper-last-posn-while-in-insert-state (point)) 345 'viper-last-posn-while-in-insert-state (point))
346 (add-hook 'viper-post-command-hooks 346 (add-hook 'viper-post-command-hooks
347 'viper-insert-state-post-command-sentinel t 'local) 347 #'viper-insert-state-post-command-sentinel t 'local)
348 (add-hook 'viper-pre-command-hooks 348 (add-hook 'viper-pre-command-hooks
349 'viper-insert-state-pre-command-sentinel t 'local)) 349 #'viper-insert-state-pre-command-sentinel t 'local))
350 ) ; outermost cond 350 ) ; outermost cond
351 351
352 ;; Nothing needs to be done to switch to emacs mode! Just set some 352 ;; Nothing needs to be done to switch to emacs mode! Just set some
@@ -1074,7 +1074,7 @@ as a Meta key and any number of multiple escapes are allowed."
1074 ;; it is an error. 1074 ;; it is an error.
1075 (progn 1075 (progn
1076 ;; new com is (CHAR . OLDCOM) 1076 ;; new com is (CHAR . OLDCOM)
1077 (if (viper-memq-char char '(?# ?\")) (user-error viper-ViperBell)) 1077 (if (viper-memq-char char '(?# ?\")) (viper--user-error))
1078 (setq com (cons char com)) 1078 (setq com (cons char com))
1079 (setq cont nil)) 1079 (setq cont nil))
1080 ;; If com is nil we set com as char, and read more. Again, if char is 1080 ;; If com is nil we set com as char, and read more. Again, if char is
@@ -1093,7 +1093,7 @@ as a Meta key and any number of multiple escapes are allowed."
1093 (let ((reg (read-char))) 1093 (let ((reg (read-char)))
1094 (if (viper-valid-register reg) 1094 (if (viper-valid-register reg)
1095 (setq viper-use-register reg) 1095 (setq viper-use-register reg)
1096 (user-error viper-ViperBell)) 1096 (viper--user-error))
1097 (setq char (read-char)))) 1097 (setq char (read-char))))
1098 (t 1098 (t
1099 (setq com char) 1099 (setq com char)
@@ -1115,7 +1115,7 @@ as a Meta key and any number of multiple escapes are allowed."
1115 (viper-regsuffix-command-p char) 1115 (viper-regsuffix-command-p char)
1116 (viper= char ?!) ; bang command 1116 (viper= char ?!) ; bang command
1117 (viper= char ?g) ; the gg command (like G0) 1117 (viper= char ?g) ; the gg command (like G0)
1118 (user-error viper-ViperBell)) 1118 (viper--user-error))
1119 (setq cmd-to-exec-at-end 1119 (setq cmd-to-exec-at-end
1120 (viper-exec-form-in-vi 1120 (viper-exec-form-in-vi
1121 `(key-binding (char-to-string ,char))))) 1121 `(key-binding (char-to-string ,char)))))
@@ -1149,7 +1149,7 @@ as a Meta key and any number of multiple escapes are allowed."
1149 ((equal com '(?= . ?=)) (viper-line (cons value ?=))) 1149 ((equal com '(?= . ?=)) (viper-line (cons value ?=)))
1150 ;; gg acts as G0 1150 ;; gg acts as G0
1151 ((equal (car com) ?g) (viper-goto-line 0)) 1151 ((equal (car com) ?g) (viper-goto-line 0))
1152 (t (user-error viper-ViperBell))))) 1152 (t (viper--user-error)))))
1153 1153
1154 (if cmd-to-exec-at-end 1154 (if cmd-to-exec-at-end
1155 (progn 1155 (progn
@@ -1432,23 +1432,25 @@ as a Meta key and any number of multiple escapes are allowed."
1432 (setq viper-intermediate-command 'viper-exec-buffer-search) 1432 (setq viper-intermediate-command 'viper-exec-buffer-search)
1433 (viper-search viper-s-string viper-s-forward 1)) 1433 (viper-search viper-s-string viper-s-forward 1))
1434 1434
1435(defvar viper-exec-array (make-vector 128 nil)) 1435(defvar viper-exec-array
1436 (let ((a (make-vector 128 nil)))
1436 1437
1437;; Using a dispatch array allows adding functions like buffer search 1438 ;; Using a dispatch array allows adding functions like buffer search
1438;; without affecting other functions. Buffer search can now be bound 1439 ;; without affecting other functions. Buffer search can now be bound
1439;; to any character. 1440 ;; to any character.
1440 1441
1441(aset viper-exec-array ?c 'viper-exec-change) 1442 (aset a ?c 'viper-exec-change)
1442(aset viper-exec-array ?C 'viper-exec-Change) 1443 (aset a ?C 'viper-exec-Change)
1443(aset viper-exec-array ?d 'viper-exec-delete) 1444 (aset a ?d 'viper-exec-delete)
1444(aset viper-exec-array ?D 'viper-exec-Delete) 1445 (aset a ?D 'viper-exec-Delete)
1445(aset viper-exec-array ?y 'viper-exec-yank) 1446 (aset a ?y 'viper-exec-yank)
1446(aset viper-exec-array ?Y 'viper-exec-Yank) 1447 (aset a ?Y 'viper-exec-Yank)
1447(aset viper-exec-array ?r 'viper-exec-dummy) 1448 (aset a ?r 'viper-exec-dummy)
1448(aset viper-exec-array ?! 'viper-exec-bang) 1449 (aset a ?! 'viper-exec-bang)
1449(aset viper-exec-array ?< 'viper-exec-shift) 1450 (aset a ?< 'viper-exec-shift)
1450(aset viper-exec-array ?> 'viper-exec-shift) 1451 (aset a ?> 'viper-exec-shift)
1451(aset viper-exec-array ?= 'viper-exec-equals) 1452 (aset a ?= 'viper-exec-equals)
1453 a))
1452 1454
1453 1455
1454 1456
@@ -1587,7 +1589,7 @@ invokes the command before that, etc."
1587(defun viper-undo-sentinel (beg end length) 1589(defun viper-undo-sentinel (beg end length)
1588 (run-hook-with-args 'viper-undo-functions beg end length)) 1590 (run-hook-with-args 'viper-undo-functions beg end length))
1589 1591
1590(add-hook 'after-change-functions 'viper-undo-sentinel) 1592(add-hook 'after-change-functions #'viper-undo-sentinel)
1591 1593
1592;; Hook used in viper-undo 1594;; Hook used in viper-undo
1593(defun viper-after-change-undo-hook (beg end _len) 1595(defun viper-after-change-undo-hook (beg end _len)
@@ -1597,7 +1599,7 @@ invokes the command before that, etc."
1597 ;; some other hooks may be changing various text properties in 1599 ;; some other hooks may be changing various text properties in
1598 ;; the buffer in response to 'undo'; so remove this hook to avoid 1600 ;; the buffer in response to 'undo'; so remove this hook to avoid
1599 ;; its repeated invocation 1601 ;; its repeated invocation
1600 (remove-hook 'viper-undo-functions 'viper-after-change-undo-hook 'local) 1602 (remove-hook 'viper-undo-functions #'viper-after-change-undo-hook 'local)
1601 )) 1603 ))
1602 1604
1603(defun viper-undo () 1605(defun viper-undo ()
@@ -1608,7 +1610,7 @@ invokes the command before that, etc."
1608 undo-beg-posn undo-end-posn) 1610 undo-beg-posn undo-end-posn)
1609 1611
1610 ;; the viper-after-change-undo-hook removes itself after the 1st invocation 1612 ;; the viper-after-change-undo-hook removes itself after the 1st invocation
1611 (add-hook 'viper-undo-functions 'viper-after-change-undo-hook nil 'local) 1613 (add-hook 'viper-undo-functions #'viper-after-change-undo-hook nil 'local)
1612 1614
1613 (undo-start) 1615 (undo-start)
1614 (undo-more 2) 1616 (undo-more 2)
@@ -1880,8 +1882,8 @@ Undo previous insertion and inserts new."
1880;;; Minibuffer business 1882;;; Minibuffer business
1881 1883
1882(defsubst viper-set-minibuffer-style () 1884(defsubst viper-set-minibuffer-style ()
1883 (add-hook 'minibuffer-setup-hook 'viper-minibuffer-setup-sentinel) 1885 (add-hook 'minibuffer-setup-hook #'viper-minibuffer-setup-sentinel)
1884 (add-hook 'post-command-hook 'viper-minibuffer-post-command-hook)) 1886 (add-hook 'post-command-hook #'viper-minibuffer-post-command-hook))
1885 1887
1886 1888
1887(defun viper-minibuffer-setup-sentinel () 1889(defun viper-minibuffer-setup-sentinel ()
@@ -2227,22 +2229,22 @@ problems."
2227 viper-sitting-in-replace t 2229 viper-sitting-in-replace t
2228 viper-replace-chars-to-delete 0) 2230 viper-replace-chars-to-delete 0)
2229 (add-hook 2231 (add-hook
2230 'viper-after-change-functions 'viper-replace-mode-spy-after t 'local) 2232 'viper-after-change-functions #'viper-replace-mode-spy-after t 'local)
2231 (add-hook 2233 (add-hook
2232 'viper-before-change-functions 'viper-replace-mode-spy-before t 'local) 2234 'viper-before-change-functions #'viper-replace-mode-spy-before t 'local)
2233 ;; this will get added repeatedly, but no harm 2235 ;; this will get added repeatedly, but no harm
2234 (add-hook 'after-change-functions 'viper-after-change-sentinel t) 2236 (add-hook 'after-change-functions #'viper-after-change-sentinel t)
2235 (add-hook 'before-change-functions 'viper-before-change-sentinel t) 2237 (add-hook 'before-change-functions #'viper-before-change-sentinel t)
2236 (viper-move-marker-locally 2238 (viper-move-marker-locally
2237 'viper-last-posn-in-replace-region (viper-replace-start)) 2239 'viper-last-posn-in-replace-region (viper-replace-start))
2238 (add-hook 2240 (add-hook
2239 'viper-post-command-hooks 'viper-replace-state-post-command-sentinel 2241 'viper-post-command-hooks #'viper-replace-state-post-command-sentinel
2240 t 'local) 2242 t 'local)
2241 (add-hook 2243 (add-hook
2242 'viper-pre-command-hooks 'viper-replace-state-pre-command-sentinel t 'local) 2244 'viper-pre-command-hooks #'viper-replace-state-pre-command-sentinel t 'local)
2243 ;; guard against a smarty who switched from R-replace to normal replace 2245 ;; guard against a smarty who switched from R-replace to normal replace
2244 (remove-hook 2246 (remove-hook
2245 'viper-post-command-hooks 'viper-R-state-post-command-sentinel 'local) 2247 'viper-post-command-hooks #'viper-R-state-post-command-sentinel 'local)
2246 (if overwrite-mode (overwrite-mode -1)) 2248 (if overwrite-mode (overwrite-mode -1))
2247 ) 2249 )
2248 2250
@@ -2316,13 +2318,13 @@ problems."
2316;; Don't delete anything if current point is past the end of the overlay. 2318;; Don't delete anything if current point is past the end of the overlay.
2317(defun viper-finish-change () 2319(defun viper-finish-change ()
2318 (remove-hook 2320 (remove-hook
2319 'viper-after-change-functions 'viper-replace-mode-spy-after 'local) 2321 'viper-after-change-functions #'viper-replace-mode-spy-after 'local)
2320 (remove-hook 2322 (remove-hook
2321 'viper-before-change-functions 'viper-replace-mode-spy-before 'local) 2323 'viper-before-change-functions #'viper-replace-mode-spy-before 'local)
2322 (remove-hook 2324 (remove-hook
2323 'viper-post-command-hooks 'viper-replace-state-post-command-sentinel 'local) 2325 'viper-post-command-hooks #'viper-replace-state-post-command-sentinel 'local)
2324 (remove-hook 2326 (remove-hook
2325 'viper-pre-command-hooks 'viper-replace-state-pre-command-sentinel 'local) 2327 'viper-pre-command-hooks #'viper-replace-state-pre-command-sentinel 'local)
2326 (viper-restore-cursor-color 'after-replace-mode) 2328 (viper-restore-cursor-color 'after-replace-mode)
2327 (setq viper-sitting-in-replace nil) ; just in case we'll need to know it 2329 (setq viper-sitting-in-replace nil) ; just in case we'll need to know it
2328 (save-excursion 2330 (save-excursion
@@ -2352,21 +2354,21 @@ problems."
2352 2354
2353(defun viper-finish-R-mode () 2355(defun viper-finish-R-mode ()
2354 (remove-hook 2356 (remove-hook
2355 'viper-post-command-hooks 'viper-R-state-post-command-sentinel 'local) 2357 'viper-post-command-hooks #'viper-R-state-post-command-sentinel 'local)
2356 (remove-hook 2358 (remove-hook
2357 'viper-pre-command-hooks 'viper-replace-state-pre-command-sentinel 'local) 2359 'viper-pre-command-hooks #'viper-replace-state-pre-command-sentinel 'local)
2358 (viper-downgrade-to-insert)) 2360 (viper-downgrade-to-insert))
2359 2361
2360(defun viper-start-R-mode () 2362(defun viper-start-R-mode ()
2361 ;; Leave arg as 1, not t: XEmacs insists that it must be a pos number 2363 ;; Leave arg as 1, not t: XEmacs insists that it must be a pos number
2362 (overwrite-mode 1) 2364 (overwrite-mode 1)
2363 (add-hook 2365 (add-hook
2364 'viper-post-command-hooks 'viper-R-state-post-command-sentinel t 'local) 2366 'viper-post-command-hooks #'viper-R-state-post-command-sentinel t 'local)
2365 (add-hook 2367 (add-hook
2366 'viper-pre-command-hooks 'viper-replace-state-pre-command-sentinel t 'local) 2368 'viper-pre-command-hooks #'viper-replace-state-pre-command-sentinel t 'local)
2367 ;; guard against a smarty who switched from R-replace to normal replace 2369 ;; guard against a smarty who switched from R-replace to normal replace
2368 (remove-hook 2370 (remove-hook
2369 'viper-post-command-hooks 'viper-replace-state-post-command-sentinel 'local) 2371 'viper-post-command-hooks #'viper-replace-state-post-command-sentinel 'local)
2370 ) 2372 )
2371 2373
2372 2374
@@ -2541,9 +2543,9 @@ On reaching end of line, stop and signal error."
2541 ;; the forward motion before the 'viper-execute-com', but, of 2543 ;; the forward motion before the 'viper-execute-com', but, of
2542 ;; course, 'dl' doesn't work on an empty line, so we have to 2544 ;; course, 'dl' doesn't work on an empty line, so we have to
2543 ;; catch that condition before 'viper-execute-com' 2545 ;; catch that condition before 'viper-execute-com'
2544 (if (and (eolp) (bolp)) (user-error viper-ViperBell) (forward-char val)) 2546 (if (and (eolp) (bolp)) (viper--user-error) (forward-char val))
2545 (if com (viper-execute-com 'viper-forward-char val com)) 2547 (if com (viper-execute-com 'viper-forward-char val com))
2546 (if (eolp) (progn (backward-char 1) (user-error viper-ViperBell)))) 2548 (if (eolp) (progn (backward-char 1) (viper--user-error))))
2547 (forward-char val) 2549 (forward-char val)
2548 (if com (viper-execute-com 'viper-forward-char val com))))) 2550 (if com (viper-execute-com 'viper-forward-char val com)))))
2549 2551
@@ -2557,7 +2559,7 @@ On reaching beginning of line, stop and signal error."
2557 (if com (viper-move-marker-locally 'viper-com-point (point))) 2559 (if com (viper-move-marker-locally 'viper-com-point (point)))
2558 (if viper-ex-style-motion 2560 (if viper-ex-style-motion
2559 (progn 2561 (progn
2560 (if (bolp) (user-error viper-ViperBell) (backward-char val)) 2562 (if (bolp) (viper--user-error) (backward-char val))
2561 (if com (viper-execute-com 'viper-backward-char val com))) 2563 (if com (viper-execute-com 'viper-backward-char val com)))
2562 (backward-char val) 2564 (backward-char val)
2563 (if com (viper-execute-com 'viper-backward-char val com))))) 2565 (if com (viper-execute-com 'viper-backward-char val com)))))
@@ -2874,7 +2876,7 @@ On reaching beginning of line, stop and signal error."
2874 (if com (viper-execute-com 'viper-goto-col val com)) 2876 (if com (viper-execute-com 'viper-goto-col val com))
2875 (save-excursion 2877 (save-excursion
2876 (end-of-line) 2878 (end-of-line)
2877 (if (> val (current-column)) (user-error viper-ViperBell))) 2879 (if (> val (current-column)) (viper--user-error)))
2878 )) 2880 ))
2879 2881
2880 2882
@@ -3001,7 +3003,7 @@ If point is on a widget or a button, simulate clicking on that widget/button."
3001;; If FORWARD then search is forward, otherwise backward. OFFSET is used to 3003;; If FORWARD then search is forward, otherwise backward. OFFSET is used to
3002;; adjust point after search. 3004;; adjust point after search.
3003(defun viper-find-char (arg char forward offset) 3005(defun viper-find-char (arg char forward offset)
3004 (or (char-or-string-p char) (user-error viper-ViperBell)) 3006 (or (char-or-string-p char) (viper--user-error))
3005 (let ((arg (if forward arg (- arg))) 3007 (let ((arg (if forward arg (- arg)))
3006 (cmd (if (eq viper-intermediate-command 'viper-repeat) 3008 (cmd (if (eq viper-intermediate-command 'viper-repeat)
3007 (nth 5 viper-d-com) 3009 (nth 5 viper-d-com)
@@ -3335,7 +3337,7 @@ controlled by the sign of prefix numeric value."
3335 (if com (viper-move-marker-locally 'viper-com-point (point))) 3337 (if com (viper-move-marker-locally 'viper-com-point (point)))
3336 (backward-sexp 1) 3338 (backward-sexp 1)
3337 (if com (viper-execute-com 'viper-paren-match nil com))) 3339 (if com (viper-execute-com 'viper-paren-match nil com)))
3338 (t (user-error viper-ViperBell)))))) 3340 (t (viper--user-error))))))
3339 3341
3340(defun viper-toggle-parse-sexp-ignore-comments () 3342(defun viper-toggle-parse-sexp-ignore-comments ()
3341 (interactive) 3343 (interactive)
@@ -3906,7 +3908,7 @@ Null string will repeat previous search."
3906 (let ((reg viper-use-register)) 3908 (let ((reg viper-use-register))
3907 (setq viper-use-register nil) 3909 (setq viper-use-register nil)
3908 (error viper-EmptyRegister reg)) 3910 (error viper-EmptyRegister reg))
3909 (user-error viper-ViperBell))) 3911 (viper--user-error)))
3910 (setq viper-use-register nil) 3912 (setq viper-use-register nil)
3911 (if (viper-end-with-a-newline-p text) 3913 (if (viper-end-with-a-newline-p text)
3912 (progn 3914 (progn
@@ -3956,7 +3958,7 @@ Null string will repeat previous search."
3956 (let ((reg viper-use-register)) 3958 (let ((reg viper-use-register))
3957 (setq viper-use-register nil) 3959 (setq viper-use-register nil)
3958 (error viper-EmptyRegister reg)) 3960 (error viper-EmptyRegister reg))
3959 (user-error viper-ViperBell))) 3961 (viper--user-error)))
3960 (setq viper-use-register nil) 3962 (setq viper-use-register nil)
3961 (if (viper-end-with-a-newline-p text) (beginning-of-line)) 3963 (if (viper-end-with-a-newline-p text) (beginning-of-line))
3962 (viper-set-destructive-command 3964 (viper-set-destructive-command
@@ -4001,7 +4003,7 @@ Null string will repeat previous search."
4001 (> val (viper-chars-in-region (point) (viper-line-pos 'end)))) 4003 (> val (viper-chars-in-region (point) (viper-line-pos 'end))))
4002 (setq val (viper-chars-in-region (point) (viper-line-pos 'end)))) 4004 (setq val (viper-chars-in-region (point) (viper-line-pos 'end))))
4003 (if (and viper-ex-style-motion (eolp)) 4005 (if (and viper-ex-style-motion (eolp))
4004 (if (bolp) (user-error viper-ViperBell) (setq val 0))) ; not bol---simply back 1 ch 4006 (if (bolp) (viper--user-error) (setq val 0))) ; not bol---simply back 1 ch
4005 (save-excursion 4007 (save-excursion
4006 (viper-forward-char-carefully val) 4008 (viper-forward-char-carefully val)
4007 (setq end-del-pos (point))) 4009 (setq end-del-pos (point)))
@@ -4271,7 +4273,7 @@ and regexp replace."
4271 ((viper= char ?,) (viper-cycle-through-mark-ring)) 4273 ((viper= char ?,) (viper-cycle-through-mark-ring))
4272 ((viper= char ?^) (push-mark viper-saved-mark t t)) 4274 ((viper= char ?^) (push-mark viper-saved-mark t t))
4273 ((viper= char ?D) (mark-defun)) 4275 ((viper= char ?D) (mark-defun))
4274 (t (user-error viper-ViperBell)) 4276 (t (viper--user-error))
4275 ))) 4277 )))
4276 4278
4277;; Algorithm: If first invocation of this command save mark on ring, goto 4279;; Algorithm: If first invocation of this command save mark on ring, goto
@@ -4370,7 +4372,7 @@ One can use \\=`\\=` and \\='\\=' to temporarily jump 1 step back."
4370 (switch-to-buffer buff) 4372 (switch-to-buffer buff)
4371 (goto-char viper-com-point) 4373 (goto-char viper-com-point)
4372 (viper-change-state-to-vi) 4374 (viper-change-state-to-vi)
4373 (user-error viper-ViperBell))))) 4375 (viper--user-error)))))
4374 ((and (not skip-white) (viper= char ?`)) 4376 ((and (not skip-white) (viper= char ?`))
4375 (if com (viper-move-marker-locally 'viper-com-point (point))) 4377 (if com (viper-move-marker-locally 'viper-com-point (point)))
4376 (if (and (viper-same-line (point) viper-last-jump) 4378 (if (and (viper-same-line (point) viper-last-jump)
diff --git a/lisp/emulation/viper-ex.el b/lisp/emulation/viper-ex.el
index 26bca686cb3..7aa3333f25c 100644
--- a/lisp/emulation/viper-ex.el
+++ b/lisp/emulation/viper-ex.el
@@ -1239,7 +1239,7 @@ reversed."
1239 (read-string "[Hit return to confirm] ") 1239 (read-string "[Hit return to confirm] ")
1240 (quit 1240 (quit
1241 (save-excursion (kill-buffer " *delete text*")) 1241 (save-excursion (kill-buffer " *delete text*"))
1242 (user-error viper-ViperBell))) 1242 (viper--user-error)))
1243 (save-excursion (kill-buffer " *delete text*"))) 1243 (save-excursion (kill-buffer " *delete text*")))
1244 (if ex-buffer 1244 (if ex-buffer
1245 (cond ((viper-valid-register ex-buffer '(Letter)) 1245 (cond ((viper-valid-register ex-buffer '(Letter))
diff --git a/lisp/emulation/viper-util.el b/lisp/emulation/viper-util.el
index 1d7bb1580ce..2af94979278 100644
--- a/lisp/emulation/viper-util.el
+++ b/lisp/emulation/viper-util.el
@@ -64,6 +64,8 @@
64(define-obsolete-function-alias 'viper-iconify 64(define-obsolete-function-alias 'viper-iconify
65 'iconify-or-deiconify-frame "27.1") 65 'iconify-or-deiconify-frame "27.1")
66 66
67(defun viper--user-error () (user-error "Viper bell"))
68(defun viper--user-error () (user-error "Viper bell"))
67 69
68;; CHAR is supposed to be a char or an integer (positive or negative) 70;; CHAR is supposed to be a char or an integer (positive or negative)
69;; LIST is a list of chars, nil, and negative numbers 71;; LIST is a list of chars, nil, and negative numbers