Function: ex-mark

ex-mark is a byte-compiled function defined in viper-ex.el.gz.

Signature

(ex-mark &optional NAME)

Source Code

;; Defined in /usr/src/emacs/lisp/emulation/viper-ex.el.gz
;; Ex mark command
;; Sets the mark to the current point.
;; If name is omitted, get the name straight from the work buffer."
(defun ex-mark (&optional name)
  (let (char)
    (if (null ex-addresses)
	(setq ex-addresses
	      (cons (point) nil)))
    (if name
	(if (eq 1 (length name))
	    (setq char (string-to-char name))
	  (error "`%s': Spurious text \"%s\" after mark name"
		 name (substring name 1)))
      (with-current-buffer (setq viper-ex-work-buf
                                 (get-buffer-create viper-ex-work-buf-name))
        (skip-chars-forward " \t")
        (if (looking-at "[a-z]")
            (progn
              (setq char (following-char))
              (forward-char 1)
              (skip-chars-forward " \t")
              (if (not (looking-at "[\n|]"))
                  (error "`%s': %s" ex-token viper-SpuriousText)))
          (error "`%s' requires a following letter" ex-token))))
    (save-excursion
      (goto-char (car ex-addresses))
      (point-to-register (1+ (- char ?a))))))