comparison lisp/progmodes/ada-mode.el @ 90228:fa0da9b57058

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-82 Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 542-553) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 116-121) - Merge from emacs--cvs-trunk--0 - Update from CVS
author Miles Bader <miles@gnu.org>
date Mon, 19 Sep 2005 10:20:33 +0000
parents a3716f7538f2 6dbba0bd58df
children 7beb78bc1f8e
comparison
equal deleted inserted replaced
90227:10fe5fadaf89 90228:fa0da9b57058
1537 (add-to-list 'ada-case-exception-substring (cons word t)) 1537 (add-to-list 'ada-case-exception-substring (cons word t))
1538 ) 1538 )
1539 1539
1540 (ada-save-exceptions-to-file file-name) 1540 (ada-save-exceptions-to-file file-name)
1541 1541
1542 (message (concat "Defining " word " as a casing exception")))) 1542 (message "%s" (concat "Defining " word " as a casing exception"))))
1543 1543
1544 (defun ada-case-read-exceptions-from-file (file-name) 1544 (defun ada-case-read-exceptions-from-file (file-name)
1545 "Read the content of the casing exception file FILE-NAME." 1545 "Read the content of the casing exception file FILE-NAME."
1546 (if (file-readable-p (expand-file-name file-name)) 1546 (if (file-readable-p (expand-file-name file-name))
1547 (let ((buffer (current-buffer))) 1547 (let ((buffer (current-buffer)))
2189 (goto-char (car cur-indent)) 2189 (goto-char (car cur-indent))
2190 (count-lines 1 (point))))) 2190 (count-lines 1 (point)))))
2191 2191
2192 (if (equal (cdr cur-indent) '(0)) 2192 (if (equal (cdr cur-indent) '(0))
2193 (message (concat "same indentation as line " (number-to-string line))) 2193 (message (concat "same indentation as line " (number-to-string line)))
2194 (message (mapconcat (lambda(x) 2194 (message "%s" (mapconcat (lambda(x)
2195 (cond 2195 (cond
2196 ((symbolp x) 2196 ((symbolp x)
2197 (symbol-name x)) 2197 (symbol-name x))
2198 ((numberp x) 2198 ((numberp x)
2199 (number-to-string x)) 2199 (number-to-string x))
2200 ((listp x) 2200 ((listp x)
2201 (concat "- " (symbol-name (cadr x)))) 2201 (concat "- " (symbol-name (cadr x))))
2202 )) 2202 ))
2203 (cdr cur-indent) 2203 (cdr cur-indent)
2204 " + ")))) 2204 " + "))))
2205 (save-excursion 2205 (save-excursion
2206 (goto-char (car cur-indent)) 2206 (goto-char (car cur-indent))
2207 (sit-for 1)))) 2207 (sit-for 1))))
2208 2208
2209 (defun ada-batch-reformat () 2209 (defun ada-batch-reformat ()
2212 command like: 2212 command like:
2213 emacs -batch -l ada-mode -f ada-batch-reformat file1 file2 ..." 2213 emacs -batch -l ada-mode -f ada-batch-reformat file1 file2 ..."
2214 2214
2215 (while command-line-args-left 2215 (while command-line-args-left
2216 (let ((source (car command-line-args-left))) 2216 (let ((source (car command-line-args-left)))
2217 (message (concat "formating " source)) 2217 (message "Formating %s" source)
2218 (find-file source) 2218 (find-file source)
2219 (ada-indent-region (point-min) (point-max)) 2219 (ada-indent-region (point-min) (point-max))
2220 (ada-adjust-case-buffer) 2220 (ada-adjust-case-buffer)
2221 (write-file source)) 2221 (write-file source))
2222 (setq command-line-args-left (cdr command-line-args-left))) 2222 (setq command-line-args-left (cdr command-line-args-left)))