Function: opascal-find-unit
opascal-find-unit is an interactive and byte-compiled function defined
in opascal.el.gz.
Signature
(opascal-find-unit UNIT)
Documentation
Find the specified OPascal source file according to opascal-search-path.
If no extension is specified, .pas is assumed. Creates a buffer for the unit.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/opascal.el.gz
(defun opascal-find-unit (unit)
"Find the specified OPascal source file according to `opascal-search-path'.
If no extension is specified, .pas is assumed. Creates a buffer for the unit."
(interactive "sOPascal unit name: ")
(let* ((unit-file (if (string-match "^\\(.*\\)\\.[a-z]+$" unit)
unit
(concat unit ".pas")))
(file (opascal-find-unit-file unit-file)))
(if (null file)
(error "Unit not found: %s" unit-file)
(find-file file)
(if (not (derived-mode-p 'opascal-mode))
(opascal-mode)))
file))