Function: idlwave-modify-abbrev

idlwave-modify-abbrev is a byte-compiled function defined in idlwave.el.gz.

Signature

(idlwave-modify-abbrev ARG &optional RESERVED)

Documentation

Tweak the abbrev we just expanded.

Argument ARG is the number of characters to move point backward if idlwave-abbrev-move is non-nil. If optional argument RESERVED is non-nil then the expansion consists of reserved words, which will be capitalized if idlwave-reserved-word-upcase is non-nil. Otherwise, the abbrev will be capitalized if idlwave-abbrev-change-case is non-nil, unless its value is down in which case the abbrev will be made into all lowercase. Returns non-nil if abbrev is left expanded.

Source Code

;; Defined in /usr/src/emacs/lisp/obsolete/idlwave.el.gz
;;; End experiment

;; It would be better to use expand.el for better abbrev handling and
;; versatility.

(defun idlwave-modify-abbrev (arg &optional reserved)
  "Tweak the abbrev we just expanded.
Argument ARG is the number of characters to move point
backward if `idlwave-abbrev-move' is non-nil.
If optional argument RESERVED is non-nil then the expansion
consists of reserved words, which will be capitalized if
`idlwave-reserved-word-upcase' is non-nil.
Otherwise, the abbrev will be capitalized if `idlwave-abbrev-change-case'
is non-nil, unless its value is `down' in which case the abbrev will be
made into all lowercase.
Returns non-nil if abbrev is left expanded."
  (if (and reserved idlwave-reserved-word-upcase)
      (upcase-region last-abbrev-location (point))
    (cond
     ((equal idlwave-abbrev-change-case 'down)
      (downcase-region last-abbrev-location (point)))
     (idlwave-abbrev-change-case
      (upcase-region last-abbrev-location (point)))))
  (if (and idlwave-abbrev-move (> arg 0))
      (setq idlwave--command-function (lambda () (backward-char (1+ arg)))))
  t)