Function: vhdl-fix-case-region-1

vhdl-fix-case-region-1 is a byte-compiled function defined in vhdl-mode.el.gz.

Signature

(vhdl-fix-case-region-1 BEG END UPPER-CASE WORD-REGEXP &optional COUNT)

Documentation

Convert all words matching WORD-REGEXP in region to lower or upper case, depending on parameter UPPER-CASE.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/vhdl-mode.el.gz
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Case fixing

(defun vhdl-fix-case-region-1 (beg end upper-case word-regexp &optional count)
  "Convert all words matching WORD-REGEXP in region to lower or upper case,
depending on parameter UPPER-CASE."
  (let ((case-replace nil)
	(pr (when (and count vhdl-progress-interval (not noninteractive))
	      (make-progress-reporter "Fixing case..." beg (copy-marker end)))))
    (vhdl-prepare-search-2
     (save-excursion
       (goto-char end)
       (setq end (point-marker))
       (goto-char beg)
       (while (re-search-forward word-regexp end t)
	 (or (vhdl-in-literal)
	     (if upper-case
		 (upcase-word -1)
	       (downcase-word -1)))
	 (when pr (progress-reporter-update pr (point))))
       (when pr (progress-reporter-done pr))))))