Function: viper-find-char-forward

viper-find-char-forward is an interactive and byte-compiled function defined in viper-cmd.el.gz.

Signature

(viper-find-char-forward ARG)

Documentation

Find char on the line.

If called interactively read the char to find from the terminal, and if called from viper-repeat, the char last used is used. This behavior is controlled by the sign of prefix numeric value.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/emulation/viper-cmd.el.gz
(defun viper-find-char-forward (arg)
  "Find char on the line.
If called interactively read the char to find from the terminal, and if
called from viper-repeat, the char last used is used.  This behavior is
controlled by the sign of prefix numeric value."
  (interactive "P")
  (let ((val (viper-p-val arg))
	(com (viper-getcom arg))
	(cmd-representation (nth 5 viper-d-com)))
    (if (> val 0)
	;; this means that the function was called interactively
	(setq viper-f-char (read-char)
	      viper-f-forward t
	      viper-f-offset nil)
      ;; viper-repeat --- set viper-F-char from command-keys
      (setq viper-F-char (if (stringp cmd-representation)
			   (viper-seq-last-elt cmd-representation)
			 viper-F-char)
	    viper-f-char viper-F-char)
      (setq val (- val)))
    (if com (viper-move-marker-locally 'viper-com-point (point)))
    (viper-find-char
     val (if (> (viper-p-val arg) 0) viper-f-char viper-F-char) t nil)
    (setq val (- val))
    (if com
	(progn
	  (setq viper-F-char viper-f-char) ; set new viper-F-char
	  (forward-char)
	  (viper-execute-com 'viper-find-char-forward val com)))))