PATCH packages
The recent message about VHDL mode reminded me that I was the last one
to sync it with upstream. So here's one more sync. Since I have never
yet gotten around to learning VHDL, and it doesn't appear that I will
soon, it would be good if someone with an actual interest in the
language would take over making these syncs.
xemacs-packages/vhdl/ChangeLog addition:
2006-04-07 Jerry James <james(a)xemacs.org>
* vhdl-mode.el: Sync with version 3.33.8.
* Makefile (AUTHOR_VERSION): Change to 3.33.8.
packages source patch:
Diff command: cvs -q diff -uN
Files affected: xemacs-packages/vhdl/vhdl-mode.el xemacs-packages/vhdl/Makefile
Index: xemacs-packages/vhdl/Makefile
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/vhdl/Makefile,v
retrieving revision 1.30
diff -d -u -r1.30 Makefile
--- xemacs-packages/vhdl/Makefile 2005/02/14 21:54:25 1.30
+++ xemacs-packages/vhdl/Makefile 2006/04/07 16:22:05
@@ -18,7 +18,7 @@
# Boston, MA 02111-1307, USA.
VERSION = 1.20
-AUTHOR_VERSION = 3.33.2
+AUTHOR_VERSION = 3.33.8
MAINTAINER = XEmacs Development Team <xemacs-beta(a)xemacs.org>
PACKAGE = vhdl
PKG_TYPE = regular
Index: xemacs-packages/vhdl/vhdl-mode.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/vhdl/vhdl-mode.el,v
retrieving revision 1.8
diff -d -u -r1.8 vhdl-mode.el
--- xemacs-packages/vhdl/vhdl-mode.el 2005/02/14 17:27:50 1.8
+++ xemacs-packages/vhdl/vhdl-mode.el 2006/04/07 16:22:06
@@ -5,14 +5,14 @@
;; Authors: Reto Zimmermann <reto(a)gnu.org>
;; Rodney J. Whitby <software.vhdl-mode(a)rwhitby.net>
;; Maintainer: Reto Zimmermann <reto(a)gnu.org>
-;; RCS: $Id: vhdl-mode.el,v 1.8 2005/02/14 17:27:50 james Exp $
+;; RCS: $Id: vhdl-mode.el,v 33.15 2005/12/09 12:30:12 reto Exp reto $
;; Keywords: languages vhdl
;; WWW:
http://opensource.ethz.ch/emacs/vhdl-mode.html
-(defconst vhdl-version "3.33.2"
+(defconst vhdl-version "3.33.8"
"VHDL Mode version number.")
-(defconst vhdl-time-stamp "2005-01-11"
+(defconst vhdl-time-stamp "2005-12-09"
"VHDL Mode time stamp for last update.")
;; This file is part of GNU Emacs.
@@ -29,8 +29,8 @@
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Commentary:
@@ -70,13 +70,13 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Emacs Versions
-;; supported: GNU Emacs 20.X/21.X, XEmacs 20.X/21.X
+;; supported: GNU Emacs 20.X/21.X/22.X, XEmacs 20.X/21.X
;; tested on: GNU Emacs 20.4, XEmacs 21.1 (marginally)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Installation
-;; Prerequisites: GNU Emacs 20.X/21.X, XEmacs 20.X/21.X.
+;; Prerequisites: GNU Emacs 20.X/21.X/22.X, XEmacs 20.X/21.X.
;; Put `vhdl-mode.el' into the `site-lisp' directory of your Emacs installation
;; or into an arbitrary directory that is added to the load path by the
@@ -128,10 +128,18 @@
;; XEmacs handling
(defconst vhdl-xemacs (string-match "XEmacs" emacs-version)
"Non-nil if XEmacs is used.")
-;; Emacs 21 handling
-(defconst vhdl-emacs-21 (and (= emacs-major-version 21) (not vhdl-xemacs))
- "Non-nil if GNU Emacs 21 is used.")
+;; Emacs 21+ handling
+(defconst vhdl-emacs-21 (and (<= 21 emacs-major-version) (not vhdl-xemacs))
+ "Non-nil if GNU Emacs 21, 22, ... is used.")
+(defconst vhdl-emacs-22 (and (<= 22 emacs-major-version) (not vhdl-xemacs))
+ "Non-nil if GNU Emacs 22, ... is used.")
+(defvar compilation-file-regexp-alist)
+(defvar itimer-version)
+(defvar lazy-lock-defer-contextually)
+(defvar lazy-lock-defer-on-scrolling)
+(defvar lazy-lock-defer-on-the-fly)
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Variables
@@ -324,6 +332,12 @@
("\\*\\*Error: LINE \\([0-9]+\\) \\*\\*\\*" 0 1 0)
("^ *Compiling \"\\(.+\\)\" " 1)
nil)
+ ;; Xilinx XST:
+ ;; ERROR:HDLParsers:164 - "test.vhd" Line 3. parse error
+ ("Xilinx XST" "xflow" "" "make" "-f
\\1"
+ nil "mkdir \\1" "./" "work/" "Makefile"
"xilinx"
+ ("^ERROR:HDLParsers:[0-9]+ - \"\\(.+\\)\" Line \\([0-9]+\\)\." 1
2 0) ("" 0)
+ nil)
)
"*List of available VHDL compilers and their properties.
Each list entry specifies the following items for a compiler:
@@ -342,7 +356,7 @@
Makefile name : name of Makefile (default is \"Makefile\")
ID string : compiler identification string (see `vhdl-project-alist')
Error message:
- Regexp : regular expression to match error messages
+ Regexp : regular expression to match error messages (*)
File subexp index: index of subexpression that matches the file name
Line subexp index: index of subexpression that matches the line number
Column subexp idx: index of subexpression that matches the column number
@@ -355,6 +369,9 @@
\"\\2\" inserts the entity name for architectures)
Case adjustment : adjust case of inserted unit names
+\(*) The regular expression must match the error message starting from the
+ beginning of the line (but not necessarily to the end of the line).
+
Compile options allows insertion of the library name (see `vhdl-project-alist')
in order to set the compilers library option (e.g. \"vcom -work my_lib\").
@@ -384,8 +401,8 @@
Please send any missing or erroneous compiler properties to the maintainer for
updating.
-NOTE: Reflect the new setting in the choice list of option `vhdl-compiler'
- by restarting Emacs."
+NOTE: Activate new error and file message regexps and reflect the new setting
+ in the choice list of option `vhdl-compiler' by restarting Emacs."
:type '(repeat
(list :tag "Compiler" :indent 2
(string :tag "Compiler name ")
@@ -1245,7 +1262,7 @@
(defgroup vhdl-testbench nil
- "Customizations for testbench generation ."
+ "Customizations for testbench generation."
:group 'vhdl-port)
(defcustom vhdl-testbench-entity-name '(".*" . "\\&_tb")
@@ -2128,7 +2145,7 @@
(defun vhdl-run-when-idle (secs repeat function)
"Wait until idle, then run FUNCTION."
- (if vhdl-xemacs
+ (if (fboundp 'start-itimer)
(start-itimer "vhdl-mode" function secs repeat t)
; (run-with-idle-timer secs repeat function)))
;; explicitely activate timer (necessary when Emacs is already idle)
@@ -2394,7 +2411,7 @@
(progn
(when file-opened (kill-buffer (current-buffer)))
(set-buffer source-buffer)
- (error (format "ERROR: File cannot be opened: \"%s\""
,file-name)))
+ (error "ERROR: File cannot be opened: \"%s\"" ,file-name))
(vhdl-warning (format "File cannot be opened: \"%s\"" ,file-name)
t)
nil))))
(condition-case info
@@ -2671,7 +2688,7 @@
(define-key vhdl-mode-map "\M-\C-a" 'vhdl-backward-same-indent)
(define-key vhdl-mode-map "\M-\C-e" 'vhdl-forward-same-indent)
(unless vhdl-xemacs ; would override `M-backspace' in XEmacs
- (define-key vhdl-mode-map "\M-\C-h" 'vhdl-mark-defun))
+ (define-key vhdl-mode-map "\M-\C-h" 'vhdl-mark-defun))
(define-key vhdl-mode-map "\M-\C-q" 'vhdl-indent-sexp)
(define-key vhdl-mode-map "\M-^" 'vhdl-delete-indentation)
;; backspace/delete key bindings
@@ -2767,9 +2784,8 @@
(define-key vhdl-mode-map "\C-c\C-i\C-m" 'vhdl-model-insert)
;; electric key bindings
(define-key vhdl-mode-map " " 'vhdl-electric-space)
- (if vhdl-intelligent-tab
- (define-key vhdl-mode-map "\t" 'vhdl-electric-tab)
- (define-key vhdl-mode-map "\t" 'indent-according-to-mode))
+ (when vhdl-intelligent-tab
+ (define-key vhdl-mode-map "\t" 'vhdl-electric-tab))
(define-key vhdl-mode-map "\r" 'vhdl-electric-return)
(define-key vhdl-mode-map "-" 'vhdl-electric-dash)
(define-key vhdl-mode-map "[" 'vhdl-electric-open-bracket)
@@ -2786,12 +2802,14 @@
;; define special minibuffer keymap for enabling word completion in minibuffer
;; (useful in template generator prompts)
-(defvar vhdl-minibuffer-local-map (copy-keymap minibuffer-local-map)
+(defvar vhdl-minibuffer-local-map
+ (let ((map (make-sparse-keymap)))
+ (set-keymap-parent map minibuffer-local-map)
+ (when vhdl-word-completion-in-minibuffer
+ (define-key map "\t" 'vhdl-minibuffer-tab))
+ map)
"Keymap for minibuffer used in VHDL Mode.")
-(when vhdl-word-completion-in-minibuffer
- (define-key vhdl-minibuffer-local-map "\t" 'vhdl-minibuffer-tab))
-
;; set up electric character functions to work with
;; `delete-selection-mode' (Emacs) and `pending-delete-mode' (XEmacs)
(mapcar
@@ -2838,7 +2856,7 @@
(modify-syntax-entry ?\< "." vhdl-mode-syntax-table)
(modify-syntax-entry ?\= "." vhdl-mode-syntax-table)
(modify-syntax-entry ?\> "." vhdl-mode-syntax-table)
- (modify-syntax-entry ?\\ "." vhdl-mode-syntax-table)
+ (modify-syntax-entry ?\\ "w" vhdl-mode-syntax-table)
(modify-syntax-entry ?\| "." vhdl-mode-syntax-table)
;; define string
(modify-syntax-entry ?\" "\"" vhdl-mode-syntax-table)
@@ -3175,6 +3193,7 @@
(vhdl-menu-split menu-list "Project"))
'("--" "--"
["Select Project..." vhdl-set-project t]
+ ["Set As Default Project" vhdl-set-default-project t]
"--"
["Duplicate Project" vhdl-duplicate-project vhdl-project]
["Import Project..." vhdl-import-project
@@ -3799,7 +3818,7 @@
(not vhdl-use-components-package))
:style toggle :selected vhdl-use-components-package]
["Include Header"
- (customize-set-variable 'vhdl-compose-include-headera
+ (customize-set-variable 'vhdl-compose-include-header
(not vhdl-compose-include-header))
:style toggle :selected vhdl-compose-include-header]
("Create Entity/Architecture Files"
@@ -3858,7 +3877,8 @@
("Highlight"
["Highlighting On/Off..."
(customize-option
- (if vhdl-xemacs 'font-lock-auto-fontify 'global-font-lock-mode)) t]
+ (if (fboundp 'global-font-lock-mode)
+ 'global-font-lock-mode 'font-lock-auto-fontify)) t]
["Highlight Keywords"
(progn (customize-set-variable 'vhdl-highlight-keywords
(not vhdl-highlight-keywords))
@@ -4275,7 +4295,7 @@
CODE FILLING:
- Code filling allows to condens code (e.g. sensitivity lists or port
+ Code filling allows to condense code (e.g. sensitivity lists or port
maps) by removing comments and newlines and re-wrapping so that all
lines are maximally filled (block filling). `C-c C-f C-f' fills a list
enclosed by parenthesis, `C-c C-f C-g' a group of lines separated by
@@ -4685,7 +4705,8 @@
"\\s-*\\(--+\\s-*$\\|[^ -]\\|$\\)")
(set (make-local-variable 'paragraph-separate) paragraph-start)
(set (make-local-variable 'paragraph-ignore-fill-prefix) t)
- (set (make-local-variable 'require-final-newline) t)
+ (set (make-local-variable 'require-final-newline)
+ (if vhdl-emacs-22 mode-require-final-newline t))
(set (make-local-variable 'parse-sexp-ignore-comments) t)
(set (make-local-variable 'indent-line-function) 'vhdl-indent-line)
(set (make-local-variable 'comment-start) "--")
@@ -4744,7 +4765,9 @@
(if noninteractive "" " See menu for documentation and release
notes."))
;; run hooks
- (run-hooks 'vhdl-mode-hook))
+ (if vhdl-emacs-22
+ (run-mode-hooks 'vhdl-mode-hook)
+ (run-hooks 'vhdl-mode-hook)))
(defun vhdl-activate-customizations ()
"Activate all customizations on local variables."
@@ -5192,7 +5215,7 @@
(defun vhdl-read-offset (langelem)
"Read new offset value for LANGELEM from minibuffer.
-Return a legal value only."
+Return a valid value only."
(let ((oldoff (format "%s" (cdr-safe (assq langelem vhdl-offsets-alist))))
(errmsg "Offset must be int, func, var, or one of +, -, ++, --: ")
(prompt "Offset: ")
@@ -5204,7 +5227,7 @@
((string-equal "++" input) '++)
((string-equal "--" input) '--)
((string-match "^-?[0-9]+$" input)
- (string-to-int input))
+ (string-to-number input))
((fboundp (setq interned (intern input)))
interned)
((boundp interned) interned)
@@ -5737,7 +5760,8 @@
(save-excursion
(re-search-backward ";\\|\\bwhen\\b[^_]" lim 'move)
(or (eq (following-char) ?\;)
- (eq (point) lim)))))
+ (eq (point) lim)
+ (vhdl-in-literal)))))
(defun vhdl-corresponding-begin (&optional lim)
"If the word at the current position corresponds to an \"end\"
@@ -6166,8 +6190,8 @@
stops due to beginning or end of buffer.
Note that if point is between the \"libunit\" keyword and the
corresponding \"begin\" keyword, then that libunit will not be
-recognised, and the search will continue backwards. If point is
-at the \"begin\" keyword, then the defun will be recognised. The
+recognized, and the search will continue backwards. If point is
+at the \"begin\" keyword, then the defun will be recognized. The
returned point is at the first character of the \"libunit\" keyword."
(let ((last-forward (point))
(last-backward
@@ -6210,8 +6234,8 @@
stops due to beginning or end of buffer."
;; Note that if point is between the "defun" keyword and the
;; corresponding "begin" keyword, then that defun will not be
- ;; recognised, and the search will continue backwards. If point is
- ;; at the "begin" keyword, then the defun will be recognised. The
+ ;; recognized, and the search will continue backwards. If point is
+ ;; at the "begin" keyword, then the defun will be recognized. The
;; returned point is at the first character of the "defun" keyword.
(interactive "p")
(let ((count (or count 1))
@@ -6264,17 +6288,17 @@
(vhdl-keep-region-active)
foundp))
-(defun vhdl-beginning-of-statement (&optional count lim)
+(defun vhdl-beginning-of-statement (&optional count lim interactive)
"Go to the beginning of the innermost VHDL statement.
With prefix arg, go back N - 1 statements. If already at the
beginning of a statement then go to the beginning of the preceding
one. If within a string or comment, or next to a comment (only
whitespace between), move by sentences instead of statements.
-When called from a program, this function takes 2 optional args: the
-prefix arg, and a buffer position limit which is the farthest back to
-search."
- (interactive "p")
+When called from a program, this function takes 3 optional args: the
+prefix arg, a buffer position limit which is the farthest back to
+search, and an argument indicating an interactive call."
+ (interactive "p\np")
(let ((count (or count 1))
(case-fold-search t)
(lim (or lim (point-min)))
@@ -6283,7 +6307,7 @@
(save-excursion
(goto-char lim)
(setq state (parse-partial-sexp (point) here nil nil)))
- (if (and (interactive-p)
+ (if (and interactive
(or (nth 3 state)
(nth 4 state)
(looking-at (concat "[ \t]*" comment-start-skip))))
@@ -7678,10 +7702,10 @@
(defun vhdl-fill-region (beg end &optional arg)
"Fill lines for a region of code."
- (interactive "r")
+ (interactive "r\np")
(save-excursion
(goto-char beg)
- (let ((margin (if (interactive-p) (current-indentation) (current-column))))
+ (let ((margin (if arg (current-indentation) (current-column))))
(goto-char end)
(setq end (point-marker))
;; remove inline comments, newlines and whitespace
@@ -7804,7 +7828,8 @@
;; parameter list of procedure call
((and (re-search-forward "^\\s-*\\w+[ \t\n]*(" proc-end t)
(1- (point)))
- (progn (forward-sexp) (point)))))
+ (progn (backward-char) (forward-sexp)
+ (while (looking-at "(") (forward-sexp)) (point)))))
name read-list sens-list signal-list
sens-beg sens-end beg end margin)
;; scan for signals in old sensitivity list
@@ -8036,7 +8061,7 @@
;; correct different behavior of function `unread-command-events' in XEmacs
(defun vhdl-character-to-event (arg))
(defalias 'vhdl-character-to-event
- (if vhdl-xemacs 'character-to-event 'identity))
+ (if (fboundp 'character-to-event) 'character-to-event 'identity))
(defun vhdl-work-library ()
"Return the working library name of the current project or \"work\" if
no
@@ -8347,7 +8372,8 @@
(let ((margin (current-indentation))
(start (point))
label)
- (unless kind (setq kind (if (vhdl-sequential-statement-p) 'is 'use)))
+ (unless kind (setq kind (if (or (vhdl-sequential-statement-p)
+ (not (vhdl-standard-p 'ams))) 'is 'use)))
(if (or (not (eq vhdl-optional-labels 'all)) (vhdl-standard-p '87))
(vhdl-insert-keyword "CASE ")
(vhdl-insert-keyword ": CASE ")
@@ -8935,7 +8961,7 @@
(vhdl-insert-keyword
(concat " " (if (eq kind 'then) "THEN" "USE")
"\n\n"))
(indent-to margin)
- (vhdl-insert-keyword "END IF")
+ (vhdl-insert-keyword (concat "END " (if (eq kind 'then)
"IF" "USE")))
(when label (insert " " label))
(insert ";")
(forward-line -1)
@@ -10587,7 +10613,7 @@
(when (stringp caught) (message caught)))
(when (= invoke-char ?-) (setq abbrev-start-location (point)))
;; delete CR which is still in event queue
- (if vhdl-xemacs
+ (if (fboundp 'enqueue-eval-event)
(enqueue-eval-event 'delete-char -1)
(setq unread-command-events ; push back a delete char
(list (vhdl-character-to-event ?\177))))))))
@@ -10983,8 +11009,8 @@
(setq group-comment (vhdl-parse-group-comment))
(setq end-of-list (vhdl-parse-string ")[ \t\n]*;[ \t\n]*" t))
(while (not end-of-list)
- ;; parse names
- (vhdl-parse-string "\\(\\w+\\)[ \t\n]*")
+ ;; parse names (accept extended identifiers)
+ (vhdl-parse-string "\\(\\w+\\|\\\\[^\\]+\\\\\\)[ \t\n]*")
(setq names (list (match-string-no-properties 1)))
(while (vhdl-parse-string ",[ \t\n]*\\(\\w+\\)[ \t\n]*" t)
(setq names
@@ -10992,6 +11018,9 @@
;; parse type
(vhdl-parse-string ":[ \t\n]*\\([^():;\n]+\\)")
(setq type (match-string-no-properties 1))
+ (when (vhdl-in-comment-p) ; if stuck in comment
+ (setq type (concat type (and (vhdl-parse-string ".*")
+ (match-string-no-properties 0)))))
(setq comment nil)
(while (looking-at "(")
(setq type
@@ -11065,6 +11094,9 @@
;; parse type
(vhdl-parse-string "\\([^();\n]+\\)")
(setq type (match-string-no-properties 1))
+ (when (vhdl-in-comment-p) ; if stuck in comment
+ (setq type (concat type (and (vhdl-parse-string ".*")
+ (match-string-no-properties 0)))))
(setq comment nil)
(while (looking-at "(")
(setq type (concat type
@@ -12302,6 +12334,12 @@
(vhdl-warning (format "Unknown VHDL project: \"%s\"" name))))
(vhdl-speedbar-update-current-project))
+(defun vhdl-set-default-project ()
+ "Set current project as default on startup."
+ (interactive)
+ (customize-set-variable 'vhdl-project vhdl-project)
+ (customize-save-customized))
+
(defun vhdl-toggle-project (name token indent)
"Set current project to NAME or unset if NAME is current project."
(vhdl-set-project (if (equal name vhdl-project) "" name)))
@@ -12799,7 +12837,9 @@
'vhdl-highlight-faces 'font-lock-variable-name-face 'custom-face)
(defface vhdl-font-lock-prompt-face
- '((((class color) (background light)) (:foreground "Red" :bold t))
+ '(;(((min-colors 88) (class color) (background light)) ; Emacs 22
+ ; (:foreground "Red1" :bold t))
+ (((class color) (background light)) (:foreground "Red" :bold t))
(((class color) (background dark)) (:foreground "Pink" :bold t))
(t (:inverse-video t)))
"Font lock mode face used to highlight prompts."
@@ -12840,6 +12880,8 @@
(defface vhdl-font-lock-reserved-words-face
'((((class color) (background light)) (:foreground "Orange" :bold t))
+ ;(((min-colors 88) (class color) (background dark)) ; Emacs 22
+ ; (:foreground "Yellow1" :bold t))
(((class color) (background dark)) (:foreground "Yellow" :bold t))
(t ()))
"Font lock mode face used to highlight additional reserved words."
@@ -13920,10 +13962,10 @@
(condition-case ()
(progn (load-file file-dir-name)
(string< (mapconcat
- (lambda (a) (format "%3d" (string-to-int a)))
+ (lambda (a) (format "%3d" (string-to-number a)))
(split-string "3.33" "\\.") "")
(mapconcat
- (lambda (a) (format "%3d" (string-to-int a)))
+ (lambda (a) (format "%3d" (string-to-number a)))
(split-string vhdl-cache-version "\\.") "")))
(error (progn (vhdl-warning (format "ERROR: Corrupted cache file:
\"%s\"" file-dir-name))
nil))))))
@@ -14297,7 +14339,7 @@
(beginning-of-line) (looking-at "^\\([0-9]+\\):"))
(re-search-backward
(format "^[0-%d]:\\s-*[[{<]-"
- (max (1- (string-to-int (match-string 1))) 0)) nil t)))
+ (max (1- (string-to-number (match-string 1))) 0)) nil t)))
(goto-char (match-end 0))
(speedbar-do-function-pointer)
(speedbar-center-buffer-smartly)))
@@ -15045,7 +15087,7 @@
(save-excursion
(beginning-of-line)
(looking-at "^\\([0-9]+\\):")
- (setq depth (string-to-int (match-string 1)))
+ (setq depth (string-to-number (match-string 1)))
(when (re-search-backward (format "^%d: *[[<{][-+?][]>}] \\([^
\n]+\\)" (1- depth)) nil t)
(setq string (match-string 1))
(set-text-properties 0 (length string) nil string)
@@ -15167,7 +15209,7 @@
"Place the entity/component under the cursor as component."
(interactive)
(if (not (vhdl-speedbar-check-unit 'entity))
- (error "ERROR: No entity/component under cursor.")
+ (error "ERROR: No entity/component under cursor")
(vhdl-speedbar-port-copy)
(if (fboundp 'speedbar-select-attached-frame)
(speedbar-select-attached-frame)
@@ -15179,7 +15221,7 @@
"Generate configuration for the architecture under the cursor."
(interactive)
(if (not (vhdl-speedbar-check-unit 'architecture))
- (error "ERROR: No architecture under cursor.")
+ (error "ERROR: No architecture under cursor")
(let ((arch-name (vhdl-speedbar-line-text))
(ent-name (vhdl-speedbar-higher-text)))
(if (fboundp 'speedbar-select-attached-frame)
@@ -15191,7 +15233,7 @@
"Select the architecture under the cursor as MRA."
(interactive)
(if (not (vhdl-speedbar-check-unit 'architecture))
- (error "ERROR: No architecture under cursor.")
+ (error "ERROR: No architecture under cursor")
(let* ((arch-key (downcase (vhdl-speedbar-line-text)))
(ent-key (downcase (vhdl-speedbar-higher-text)))
(ent-alist (aget vhdl-entity-alist
@@ -15258,7 +15300,8 @@
:group 'speedbar-faces)
(defface vhdl-speedbar-architecture-face
- '((((class color) (background light)) (:foreground "Blue"))
+ '(;(((min-colors 88) (class color) (background light)) (:foreground
"Blue1")) ; Emacs 22
+ (((class color) (background light)) (:foreground "Blue"))
(((class color) (background dark)) (:foreground "LightSkyBlue")))
"Face used for displaying architecture names."
:group 'speedbar-faces)
@@ -15283,6 +15326,7 @@
(defface vhdl-speedbar-instantiation-face
'((((class color) (background light)) (:foreground "Brown"))
+ ;(((min-colors 88) (class color) (background dark)) (:foreground
"Yellow1")) ; Emacs 22
(((class color) (background dark)) (:foreground "Yellow")))
"Face used for displaying instantiation names."
:group 'speedbar-faces)
@@ -15300,7 +15344,9 @@
:group 'speedbar-faces)
(defface vhdl-speedbar-architecture-selected-face
- '((((class color) (background light)) (:foreground "Blue" :underline t))
+ '(;(((min-colors 88) (class color) (background light)) ; Emacs 22
+ ; (:foreground "Blue1" :underline t))
+ (((class color) (background light)) (:foreground "Blue" :underline t))
(((class color) (background dark)) (:foreground "LightSkyBlue" :underline
t)))
"Face used for displaying architecture names."
:group 'speedbar-faces)
@@ -15598,7 +15644,7 @@
(cons constant-name
(if (match-string 1)
(or (aget generic-alist (match-string 2) t)
- (error (format "ERROR: Formal generic \"%s\" mismatch for instance
\"%s\"" (match-string 2) inst-name)))
+ (error "ERROR: Formal generic \"%s\" mismatch for instance
\"%s\"" (match-string 2) inst-name))
(cdar generic-alist))))
(setq constant-alist (cons constant-entry constant-alist))
(setq constant-name (downcase constant-name))
@@ -15618,7 +15664,7 @@
(setq signal-entry (cons signal-name
(if (match-string 1)
(or (aget port-alist (match-string 2) t)
- (error (format "ERROR: Formal port \"%s\" mismatch for instance
\"%s\"" (match-string 2) inst-name)))
+ (error "ERROR: Formal port \"%s\" mismatch for instance
\"%s\"" (match-string 2) inst-name))
(cdar port-alist))))
(setq signal-alist (cons signal-entry signal-alist))
(setq signal-name (downcase signal-name))
@@ -16266,11 +16312,17 @@
(compile (concat command " " options " " file-name)))
(vhdl-warning "Your project settings tell me not to compile this
file"))))
+(defvar vhdl-make-target "all"
+ "Default target for `vhdl-make' command.")
+
(defun vhdl-make (&optional target)
"Call make command for compilation of all updated source files (requires
`Makefile'). Optional argument TARGET allows to compile the design
specified by a target."
(interactive)
+ (setq vhdl-make-target
+ (or target (read-from-minibuffer "Target: " vhdl-make-target
+ vhdl-minibuffer-local-map)))
(vhdl-compile-init)
(let* ((project (aget vhdl-project-alist vhdl-project))
(compiler (or (aget vhdl-compiler-alist vhdl-compiler)
@@ -16282,7 +16334,7 @@
(error "ERROR: Compile directory does not exist: \"%s\""
default-directory))
;; run make
(compile (concat (if (equal command "") "make" command)
- " " options " " target))))
+ " " options " " vhdl-make-target))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Makefile generation
@@ -16946,26 +16998,26 @@
(defun vhdl-doc-variable (variable)
"Display VARIABLE's documentation in *Help* buffer."
(interactive)
- (with-output-to-temp-buffer "*Help*"
+ (unless vhdl-xemacs
+ (help-setup-xref (list #'vhdl-doc-variable variable) (interactive-p)))
+ (with-output-to-temp-buffer
+ (if (fboundp 'help-buffer) (help-buffer) "*Help*")
(princ (documentation-property variable 'variable-documentation))
- (unless vhdl-xemacs
- (help-setup-xref (list #'vhdl-doc-variable variable) (interactive-p)))
- (save-excursion
- (set-buffer standard-output)
+ (with-current-buffer standard-output
(help-mode))
(print-help-return-message)))
(defun vhdl-doc-mode ()
"Display VHDL Mode documentation in *Help* buffer."
(interactive)
- (with-output-to-temp-buffer "*Help*"
+ (unless vhdl-xemacs
+ (help-setup-xref (list #'vhdl-doc-mode) (interactive-p)))
+ (with-output-to-temp-buffer
+ (if (fboundp 'help-buffer) (help-buffer) "*Help*")
(princ mode-name)
(princ " mode:\n")
(princ (documentation 'vhdl-mode))
- (unless vhdl-xemacs
- (help-setup-xref (list #'vhdl-doc-mode) (interactive-p)))
- (save-excursion
- (set-buffer standard-output)
+ (with-current-buffer standard-output
(help-mode))
(print-help-return-message)))
--
Jerry James, Assistant Professor james(a)xemacs.org
Computer Science Department
http://www.cs.usu.edu/~jerry/
Utah State University