Function: woman-set-arg

woman-set-arg is a byte-compiled function defined in woman.el.gz.

Signature

(woman-set-arg ARG &optional PREVIOUS)

Documentation

Reset, increment or decrement argument ARG, which must be quoted.

If no argument then use value of optional arg PREVIOUS if non-nil, otherwise set PREVIOUS. Delete the whole remaining control line.

Source Code

;; Defined in /usr/src/emacs/lisp/woman.el.gz
;;; Line Length and Indenting:

(defun woman-set-arg (arg &optional previous)
  "Reset, increment or decrement argument ARG, which must be quoted.
If no argument then use value of optional arg PREVIOUS if non-nil,
otherwise set PREVIOUS.  Delete the whole remaining control line."
  (if (eolp)				; space already skipped
      (set arg (if previous (symbol-value previous) 0))
    (if previous (set previous (symbol-value arg)))
    (woman2-process-escapes-to-eol 'numeric)
    (let ((pm (if (looking-at "[+-]")
		(prog1 (following-char)
		  (forward-char 1))))
	(i (woman-parse-numeric-arg)))
    (cond ((null pm) (set arg i))
	  ((= pm ?+) (set arg (+ (symbol-value arg) i)))
	  ((= pm ?-) (set arg (- (symbol-value arg) i)))
	  ))
    (beginning-of-line))
  (woman-delete-line 1))		; ignore any remaining arguments