(ada-goto-open-paren)
(funcall indent-line-function); so new list is indented properly
- (let* ((inibit-modification-hooks t)
+ (let* ((inhibit-modification-hooks t)
(begin (point))
(delend (progn (forward-sexp) (point))); just after matching closing paren
(end (progn (backward-char) (forward-comment (- (point))) (point))); end of last parameter-declaration
(progn
(setq word (substring word 1))
(unless (assoc-string word partial-exceptions t)
- (add-to-list 'partial-exceptions (cons word t))))
+ (push (cons word t) partial-exceptions)))
;; full word exception
(unless (assoc-string word full-exceptions t)
- (add-to-list 'full-exceptions (cons word t))))
+ (push (cons word t) full-exceptions)))
(forward-line 1))
)
An item in both lists has the RESULT value."
(dolist (item new)
(unless (assoc-string (car item) result t)
- (add-to-list 'result item)))
+ (push item result)))
result)
(defun ada-case-merge-all-exceptions (exceptions)
"Add case exception WORD to EXCEPTIONS, replacing current entry, if any."
(if (assoc-string word exceptions t)
(setcar (assoc-string word exceptions t) word)
- (add-to-list 'exceptions (cons word t)))
+ (push (cons word t) exceptions))
exceptions)
(defun ada-case-create-exception (&optional word file-name partial)
(setq project (plist-put project 'case_strict (intern (match-string 2)))))
((string= (match-string 1) "casing")
- (add-to-list 'casing
- (expand-file-name
- (substitute-in-file-name (match-string 2)))))
+ (cl-pushnew (expand-file-name
+ (substitute-in-file-name (match-string 2)))
+ casing :test #'equal))
((string= (match-string 1) "el_file")
(let ((file (expand-file-name (substitute-in-file-name (match-string 2)))))
(load-file file)))
((string= (match-string 1) "src_dir")
- (add-to-list 'src_dir
- (file-name-as-directory
- (expand-file-name (match-string 2)))))
+ (cl-pushnew (file-name-as-directory
+ (expand-file-name (match-string 2)))
+ src_dir :test #'equal))
((string= (match-string 1) "xref_tool")
(let ((xref (intern (match-string 2))))
);; done reading file
;; process accumulated lists
- (if casing (set 'project (plist-put project 'casing (reverse casing))))
- (if src_dir (set 'project (plist-put project 'src_dir (reverse src_dir))))
+ (if casing (setq project (plist-put project 'casing (reverse casing))))
+ (if src_dir (setq project (plist-put project 'src_dir (reverse src_dir))))
(when parse-final-compiler
;; parse-final-compiler may reference the "current project", so
(unless (featurep 'ada-xref-tool)
(cl-case ada-xref-tool
- ((nil 'gnat) (require 'ada-gnat-xref))
- ('gnat_inspect (require 'gnat-inspect))
- ('gpr_query (require 'gpr-query))
+ ((nil gnat) (require 'ada-gnat-xref))
+ (gnat_inspect (require 'gnat-inspect))
+ (gpr_query (require 'gpr-query))
))
(unless (featurep 'ada-compiler)