Function: vhdl-point
vhdl-point is a macro defined in vhdl-mode.el.gz.
Signature
(vhdl-point POSITION)
Documentation
Return the value of point at certain commonly referenced POSITIONs.
POSITION can be one of the following symbols:
bol -- beginning of line
eol -- end of line
bod -- beginning of defun
boi -- back to indentation
eoi -- last whitespace on line
ionl -- indentation of next line
iopl -- indentation of previous line
bonl -- beginning of next line
bopl -- beginning of previous line
This function does not modify point or mark.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/vhdl-mode.el.gz
;; Macro definitions:
(defmacro vhdl-point (position)
"Return the value of point at certain commonly referenced POSITIONs.
POSITION can be one of the following symbols:
bol -- beginning of line
eol -- end of line
bod -- beginning of defun
boi -- back to indentation
eoi -- last whitespace on line
ionl -- indentation of next line
iopl -- indentation of previous line
bonl -- beginning of next line
bopl -- beginning of previous line
This function does not modify point or mark."
(or (and (eq 'quote (car-safe position))
(null (cddr position)))
(error "ERROR: Bad buffer position requested: %s" position))
(setq position (nth 1 position))
`(let ((here (point)))
,@(cond
((eq position 'bol) '((beginning-of-line)))
((eq position 'eol) '((end-of-line)))
((eq position 'bod) '((save-match-data
(vhdl-beginning-of-defun))))
((eq position 'boi) '((back-to-indentation)))
((eq position 'eoi) '((end-of-line) (skip-chars-backward " \t")))
((eq position 'bonl) '((forward-line 1)))
((eq position 'bopl) '((forward-line -1)))
((eq position 'iopl)
'((forward-line -1)
(back-to-indentation)))
((eq position 'ionl)
'((forward-line 1)
(back-to-indentation)))
(t (error "ERROR: Unknown buffer position requested: %s" position))
)
(prog1
(point)
(goto-char here))
;; workaround for an Emacs18 bug -- blech! Well, at least it
;; doesn't hurt for v19
,@nil
))