comparison lisp/progmodes/ada-mode.el @ 63425:d6e1fdb10546

(ada-create-case-exception, ada-create-case-exception-substring, ada-make-subprogram-body): Follow error conventions.
author Juanma Barranquero <lekktu@gmail.com>
date Tue, 14 Jun 2005 15:23:26 +0000
parents f2892faa87d4
children d6d50a511d12 e58cb448e07c a1b34dec1104
comparison
equal deleted inserted replaced
63424:9d665488ae5a 63425:d6e1fdb10546
1460 (setq file-name ada-case-exception-file)) 1460 (setq file-name ada-case-exception-file))
1461 ((listp ada-case-exception-file) 1461 ((listp ada-case-exception-file)
1462 (setq file-name (car ada-case-exception-file))) 1462 (setq file-name (car ada-case-exception-file)))
1463 (t 1463 (t
1464 (error (concat "No exception file specified. " 1464 (error (concat "No exception file specified. "
1465 "See variable ada-case-exception-file.")))) 1465 "See variable ada-case-exception-file"))))
1466 1466
1467 (set-syntax-table ada-mode-symbol-syntax-table) 1467 (set-syntax-table ada-mode-symbol-syntax-table)
1468 (unless word 1468 (unless word
1469 (save-excursion 1469 (save-excursion
1470 (skip-syntax-backward "w") 1470 (skip-syntax-backward "w")
1499 ada-case-exception-file) 1499 ada-case-exception-file)
1500 ((listp ada-case-exception-file) 1500 ((listp ada-case-exception-file)
1501 (car ada-case-exception-file)) 1501 (car ada-case-exception-file))
1502 (t 1502 (t
1503 (error (concat "No exception file specified. " 1503 (error (concat "No exception file specified. "
1504 "See variable ada-case-exception-file.")))))) 1504 "See variable ada-case-exception-file"))))))
1505 1505
1506 ;; Find the substring to define as an exception. Order is: the parameter, 1506 ;; Find the substring to define as an exception. Order is: the parameter,
1507 ;; if any, or the selected region, or the word under the cursor 1507 ;; if any, or the selected region, or the word under the cursor
1508 (cond 1508 (cond
1509 (word nil) 1509 (word nil)
5396 5396
5397 ;; If find-file.el was available, use its functions 5397 ;; If find-file.el was available, use its functions
5398 (setq body-file (ada-get-body-name)) 5398 (setq body-file (ada-get-body-name))
5399 (if body-file 5399 (if body-file
5400 (find-file body-file) 5400 (find-file body-file)
5401 (error "No body found for the package. Create it first.")) 5401 (error "No body found for the package. Create it first"))
5402 5402
5403 (save-restriction 5403 (save-restriction
5404 (widen) 5404 (widen)
5405 (goto-char (point-max)) 5405 (goto-char (point-max))
5406 (forward-comment -10000) 5406 (forward-comment -10000)