diff options
author | Andrea Corallo <akrl@sdf.org> | 2021-01-02 10:11:15 +0100 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2021-01-02 10:11:15 +0100 |
commit | 5db5064395c251a822e429e19ddecb74a974b6ef (patch) | |
tree | 2e04729a03d5fc68d0caef3a16e00349b6d413fc /lisp/progmodes/vhdl-mode.el | |
parent | 9420ea6e0840bffcb140d3677dfdabb9251c1f63 (diff) | |
parent | 0f561ee55348ff451600cc6027db5940ee14606f (diff) | |
download | emacs-5db5064395c251a822e429e19ddecb74a974b6ef.tar.gz emacs-5db5064395c251a822e429e19ddecb74a974b6ef.tar.bz2 emacs-5db5064395c251a822e429e19ddecb74a974b6ef.zip |
Merge remote-tracking branch 'savannah/master' into HEAD
Diffstat (limited to 'lisp/progmodes/vhdl-mode.el')
-rw-r--r-- | lisp/progmodes/vhdl-mode.el | 97 |
1 files changed, 45 insertions, 52 deletions
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index 489092f58e6..c4de800e332 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -1,6 +1,6 @@ ;;; vhdl-mode.el --- major mode for editing VHDL code -;; Copyright (C) 1992-2020 Free Software Foundation, Inc. +;; Copyright (C) 1992-2021 Free Software Foundation, Inc. ;; Authors: Reto Zimmermann <reto@gnu.org> ;; Rodney J. Whitby <software.vhdl-mode@rwhitby.net> @@ -2286,7 +2286,7 @@ Ignore byte-compiler warnings you might see." (setq contents (nconc (if (and (car dirs) (not full)) - (mapcar (function (lambda (name) (concat (car dirs) name))) + (mapcar (lambda (name) (concat (car dirs) name)) this-dir-contents) this-dir-contents) contents)))) @@ -2563,7 +2563,7 @@ conversion." (defun vhdl-sort-alist (alist) "Sort ALIST." - (sort alist (function (lambda (a b) (string< (car a) (car b)))))) + (sort alist (lambda (a b) (string< (car a) (car b))))) (defun vhdl-get-subdirs (directory) "Recursively get subdirectories of DIRECTORY." @@ -2941,10 +2941,9 @@ STRING are replaced by `-' and substrings are converted to lower case." ;; set up electric character functions to work with ;; `delete-selection-mode' (Emacs) and `pending-delete-mode' (XEmacs) (mapc - (function - (lambda (sym) - (put sym 'delete-selection t) ; for `delete-selection-mode' (Emacs) - (put sym 'pending-delete t))) ; for `pending-delete-mode' (XEmacs) + (lambda (sym) + (put sym 'delete-selection t) ; for `delete-selection-mode' (Emacs) + (put sym 'pending-delete t)) ; for `pending-delete-mode' (XEmacs) '(vhdl-electric-space vhdl-electric-tab vhdl-electric-return @@ -3317,7 +3316,7 @@ STRING are replaced by `-' and substrings are converted to lower case." (setq menu-list (if vhdl-project-sort (sort menu-list - (function (lambda (a b) (string< (elt a 0) (elt b 0))))) + (lambda (a b) (string< (elt a 0) (elt b 0)))) (nreverse menu-list))) (vhdl-menu-split menu-list "Project")) '("--" "--" @@ -5566,9 +5565,8 @@ offset for that syntactic element. Optional ADD-P says to add SYMBOL to (if current-prefix-arg " or add" "") ": ") (mapcar - (function - (lambda (langelem) - (cons (format "%s" (car langelem)) nil))) + (lambda (langelem) + (cons (format "%s" (car langelem)) nil)) vhdl-offsets-alist) nil (not current-prefix-arg) ;; initial contents tries to be the last element @@ -5615,26 +5613,24 @@ argument. The styles are chosen from the `vhdl-style-alist' variable." (error "ERROR: Invalid VHDL indentation style `%s'" style)) ;; set all the variables (mapc - (function - (lambda (varentry) - (let ((var (car varentry)) - (val (cdr varentry))) - ;; special case for vhdl-offsets-alist - (if (not (eq var 'vhdl-offsets-alist)) - (set (if local (make-local-variable var) var) val) - ;; reset vhdl-offsets-alist to the default value first - (set (if local (make-local-variable var) var) - (copy-alist vhdl-offsets-alist-default)) - ;; now set the langelems that are different - (mapcar - (function - (lambda (langentry) - (let ((langelem (car langentry)) - (offset (cdr langentry))) - (vhdl-set-offset langelem offset) - ))) - val)) - ))) + (lambda (varentry) + (let ((var (car varentry)) + (val (cdr varentry))) + ;; special case for vhdl-offsets-alist + (if (not (eq var 'vhdl-offsets-alist)) + (set (if local (make-local-variable var) var) val) + ;; reset vhdl-offsets-alist to the default value first + (set (if local (make-local-variable var) var) + (copy-alist vhdl-offsets-alist-default)) + ;; now set the langelems that are different + (mapcar + (lambda (langentry) + (let ((langelem (car langentry)) + (offset (cdr langentry))) + (vhdl-set-offset langelem offset) + )) + val)) + )) vars)) (vhdl-keep-region-active)) @@ -7578,12 +7574,11 @@ ENDPOS is encountered." (expurgated)) ;; remove the library unit symbols (mapc - (function - (lambda (elt) - (if (memq (car elt) '(entity configuration context package - package-body architecture)) - nil - (setq expurgated (append expurgated (list elt)))))) + (lambda (elt) + (if (memq (car elt) '(entity configuration context package + package-body architecture)) + nil + (setq expurgated (append expurgated (list elt))))) actual) (if (and (not arg) expected (listp expected)) (if (not (equal expected expurgated)) @@ -7950,7 +7945,7 @@ the token in MATCH." (push (cons start length) comment-list)) (beginning-of-line 2)) (setq comment-list - (sort comment-list (function (lambda (a b) (> (car a) (car b)))))) + (sort comment-list (lambda (a b) (> (car a) (car b))))) ;; reduce start positions (setq start-list (list (caar comment-list))) (setq comment-list (cdr comment-list)) @@ -15886,8 +15881,7 @@ NO-POSITION non-nil means do not re-position cursor." (setq path-list-1 (append (mapcar - (function - (lambda (var) (concat path-beg var path-end))) + (lambda (var) (concat path-beg var path-end)) (let ((all-list (vhdl-directory-files (match-string 2 dir) t (concat "\\<" (wildcard-to-regexp @@ -17440,8 +17434,8 @@ specified by a target." (setq tmp-list (cdr tmp-list))) (setq rule-alist ; sort by first rule target (sort rule-alist - (function (lambda (a b) - (string< (car (cadr a)) (car (cadr b))))))) + (lambda (a b) + (string< (car (cadr a)) (car (cadr b)))))) ;; open and clear Makefile (set-buffer (find-file-noselect makefile-path-name t t)) (erase-buffer) @@ -17752,16 +17746,15 @@ specified by a target." 'vhdl-word-completion-in-minibuffer 'vhdl-underscore-is-part-of-word 'vhdl-mode-hook) - (function - (lambda () - (insert - (if vhdl-special-indent-hook - (concat "\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n" - "vhdl-special-indent-hook is set to '" - (format "%s" vhdl-special-indent-hook) - ".\nPerhaps this is your problem?\n" - "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n\n") - "\n")))) + (lambda () + (insert + (if vhdl-special-indent-hook + (concat "\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n" + "vhdl-special-indent-hook is set to '" + (format "%s" vhdl-special-indent-hook) + ".\nPerhaps this is your problem?\n" + "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n\n") + "\n"))) nil "Hi Reto,")))) |