;; filed in the Emacs bug reporting system against this file, a copy
;; of the bug report be sent to the maintainer's email address.
-(defconst vhdl-version "3.34.2"
+(defconst vhdl-version "3.35.1"
"VHDL Mode version number.")
-(defconst vhdl-time-stamp "2012-11-21"
+(defconst vhdl-time-stamp "2014-03-11"
"VHDL Mode time stamp for last update.")
;; This file is part of GNU Emacs.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Emacs Versions
-;; this updated version was only tested on: GNU Emacs 20.4
+;; this updated version was only tested on: GNU Emacs 24.1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Installation
-;; Prerequisites: GNU Emacs 20.X/21.X/22.X/23.X, XEmacs 20.X/21.X.
+;; Prerequisites: GNU Emacs 20/21/22/23/24, XEmacs 20/21.
;; 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
Unit-to-file name mapping: mapping of library unit names to names of files
generated by the compiler (used for Makefile generation)
To string : string a name is mapped to (\"\\1\" inserts the unit name,
- \"\\2\" inserts the entity name for architectures)
+ \"\\2\" inserts the entity name for architectures,
+ \"\\3\" inserts the library name)
Case adjustment : adjust case of inserted unit names
\(*) The regular expression must match the error message starting from the
"Customizations for sequential processes."
:group 'vhdl-template)
-(defcustom vhdl-reset-kind 'async
+(defcustom vhdl-reset-kind 'async
"Specifies which kind of reset to use in sequential processes."
:type '(choice (const :tag "None" none)
(const :tag "Synchronous" sync)
"Wait until idle, then run FUNCTION."
(if (fboundp 'start-itimer)
(start-itimer "vhdl-mode" function secs repeat t)
-; (run-with-idle-timer secs repeat function)))
;; explicitly activate timer (necessary when Emacs is already idle)
(aset (run-with-idle-timer secs repeat function) 0 nil)))
(set-buffer (marker-buffer marker)))
(goto-char marker))
-(defun vhdl-goto-line (line)
- "Use this instead of calling user level function `goto-line'."
- (goto-char (point-min))
- (forward-line (1- line)))
-
(defun vhdl-menu-split (list title)
"Split menu LIST into several submenus, if number of
elements > `vhdl-menu-max-size'."
(make-variable-buffer-local 'vhdl-syntactic-context)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Abbrev ook bindings
+;; Abbrev hook bindings
(defvar vhdl-mode-abbrev-table nil
"Abbrev table to use in `vhdl-mode' buffers.")
(define-abbrev-table 'vhdl-mode-abbrev-table
(append
(when (memq 'vhdl vhdl-electric-keywords)
- ;; VHDL'93 keywords
- (mapcar (lambda (x) (list (car x) "" (cdr x) 0 'system))
+ ;; VHDL'02 keywords
+ (mapcar (if (featurep 'xemacs)
+ (lambda (x) (list (car x) "" (cdr x) 0))
+ (lambda (x) (list (car x) "" (cdr x) 0 'system)))
'(
("--" . vhdl-template-display-comment-hook)
("abs" . vhdl-template-default-hook)
)))
;; VHDL-AMS keywords
(when (and (memq 'vhdl vhdl-electric-keywords) (vhdl-standard-p 'ams))
- (mapcar (lambda (x) (list (car x) "" (cdr x) 0 'system))
+ (mapcar (if (featurep 'xemacs)
+ (lambda (x) (list (car x) "" (cdr x) 0))
+ (lambda (x) (list (car x) "" (cdr x) 0 'system)))
'(
("across" . vhdl-template-default-hook)
("break" . vhdl-template-break-hook)
;; set local variables
(set (make-local-variable 'paragraph-start)
- "\\s-*\\(--+\\s-*$\\|[^ -]\\|$\\)")
+ "\\s-*\\(--+\\s-*$\\|$\\)")
(set (make-local-variable 'paragraph-separate) paragraph-start)
(set (make-local-variable 'paragraph-ignore-fill-prefix) t)
(set (make-local-variable 'parse-sexp-ignore-comments) t)
(set (make-local-variable 'font-lock-support-mode) 'lazy-lock-mode)
(set (make-local-variable 'lazy-lock-defer-contextually) nil)
(set (make-local-variable 'lazy-lock-defer-on-the-fly) t)
-; (set (make-local-variable 'lazy-lock-defer-time) 0.1)
(set (make-local-variable 'lazy-lock-defer-on-scrolling) t))
-; (turn-on-font-lock)
;; variables for source file compilation
(when vhdl-compile-use-local-error-regexp
(setq end (point-marker))
(goto-char begin)
(setq bol (setq begin (progn (beginning-of-line) (point))))
-; (untabify bol end)
(when indent
(indent-region bol end nil))))
(let ((copy (copy-alist alignment-list)))
(and (looking-at "\\s-+") (re-search-forward "\\s-+" end t)
(progn (replace-match " " nil nil) t))
(and (looking-at "-") (re-search-forward "-" end t))
-; (re-search-forward "[^ \t-]+" end t))))
(re-search-forward "[^ \t\"-]+" end t))))
(unless no-message (message "Fixing up whitespace...done")))
(while (re-search-forward "\\<\\(for\\|if\\)\\>" end t)
(goto-char (match-end 1))
(setq point (point-marker))
- ;; exception: in literal or preceded by `end' or label
+ ;; exception: in literal or preceded by `end', `wait' or label
(when (and (not (save-excursion (goto-char (match-beginning 1))
(vhdl-in-literal)))
(save-excursion
(and (re-search-forward "^\\s-*\\([^ \t\n].*\\)"
(match-beginning 1) t)
(not (string-match
- "\\(\\<end\\>\\|\\<wait\\>\\|\\w+\\s-*:\\)\\s-*$"
+ "\\(\\<end\\>\\|\\<wait .*\\|\\w+\\s-*:\\)\\s-*$"
(match-string 1)))))))
(goto-char (match-beginning 1))
(insert "\n")
(when (nth 0 vhdl-beautify-options) (vhdl-fixup-whitespace-region beg end t))
(when (nth 1 vhdl-beautify-options) (vhdl-fix-statement-region beg end))
(when (nth 2 vhdl-beautify-options) (vhdl-indent-region beg end))
- (let ((vhdl-align-groups t))
- (when (nth 3 vhdl-beautify-options) (vhdl-align-region beg end)))
+ (when (nth 3 vhdl-beautify-options)
+ (let ((vhdl-align-groups t)) (vhdl-align-region beg end)))
(when (nth 4 vhdl-beautify-options) (vhdl-fix-case-region beg end))
- (when (nth 0 vhdl-beautify-options) (vhdl-remove-trailing-spaces-region beg end)))
+ (when (nth 0 vhdl-beautify-options)
+ (vhdl-remove-trailing-spaces-region beg end)
+ (if vhdl-indent-tabs-mode (tabify beg end) (untabify beg end))))
(defun vhdl-beautify-buffer ()
"Beautify buffer by applying indentation, whitespace fixup, alignment, and
(setq beg (point))))))
;; search for signals declared in surrounding block declarative parts
(save-excursion
- (while (and (progn (while (and (setq beg (re-search-backward "^\\s-*\\(\\w+\\s-*:\\s-*block\\|\\(end\\)\\s-+block\\)\\>" nil t))
- (match-string 2))
- (goto-char (match-end 2))
+ (while (and (progn (while (and (setq beg (re-search-backward "^\\s-*\\(\\w+\\s-*:\\s-*\\(block\\|\\(for\\|if\\).*\\<generate\\>\\)\\|\\(end\\)\\s-+block\\)\\>" nil t))
+ (match-string 4))
+ (goto-char (match-end 4))
(vhdl-backward-sexp)
- (re-search-backward "^\\s-*\\w+\\s-*:\\s-*block\\>" nil t))
+ (re-search-backward "^\\s-*\\w+\\s-*:\\s-*\\(block\\|generate\\)\\>" nil t))
beg)
(setq end (re-search-forward "^\\s-*begin\\>" nil t)))
;; scan for all declared signal names
(interactive)
(when (vhdl-template-field "target signal")
(insert " <= ")
-; (if (not (equal (vhdl-template-field "[GUARDED] [TRANSPORT]") ""))
-; (insert " "))
(let ((margin (current-column))
(start (point))
position)
(defun vhdl-template-record (kind &optional name secondary)
"Insert a record type declaration."
(interactive)
- (let ((margin (current-column))
+ (let ((margin (current-indentation))
(start (point))
(first t))
(vhdl-insert-keyword "RECORD\n")
(insert "\n")
(indent-to (+ margin vhdl-basic-offset))
(vhdl-template-field "target signal" " <= ")
-; (vhdl-template-field "[GUARDED] [TRANSPORT]")
(insert "\n")
(indent-to (+ margin vhdl-basic-offset))
(vhdl-template-field "waveform")
(if (not (or (and string (progn (insert string) t))
(vhdl-template-field "[comment]" nil t)))
(delete-region position (point))
- (while (= (preceding-char) ?\ ) (delete-char -1))
- ;; (when (> (current-column) end-comment-column)
- ;; (setq position (point-marker))
- ;; (re-search-backward "-- ")
- ;; (insert "\n")
- ;; (indent-to comment-column)
- ;; (goto-char position))
- ))))
+ (while (= (preceding-char) ?\ ) (delete-char -1))))))
(defun vhdl-comment-block ()
"Insert comment for code block."
(defun vhdl-template-generate-body (margin label)
"Insert body for generate template."
(vhdl-insert-keyword " GENERATE")
-; (if (not (vhdl-standard-p '87))
-; (vhdl-template-begin-end "GENERATE" label margin)
(insert "\n\n")
(indent-to margin)
(vhdl-insert-keyword "END GENERATE ")
comment group-comment))))
;; parse group comment and spacing
(setq group-comment (vhdl-parse-group-comment))))
-; (vhdl-parse-string "end\\>")
;; parse context clause
(setq context-clause (vhdl-scan-context-clause))
; ;; add surrounding package to context clause
(while (and he-expand-list
(or (not (stringp (car he-expand-list)))
(he-string-member (car he-expand-list) he-tried-table t)))
-; (equal (car he-expand-list) he-search-string)))
(unless (stringp (car he-expand-list))
(setq vhdl-expand-upper-case (car he-expand-list)))
(setq he-expand-list (cdr he-expand-list)))
(defalias 'he-list-beg 'vhdl-he-list-beg))
;; function for expanding abbrevs and dabbrevs
-(defalias 'vhdl-expand-abbrev (make-hippie-expand-function
- '(try-expand-dabbrev
- try-expand-dabbrev-all-buffers
- vhdl-try-expand-abbrev)))
+(defun vhdl-expand-abbrev (arg))
+(fset 'vhdl-expand-abbrev (make-hippie-expand-function
+ '(try-expand-dabbrev
+ try-expand-dabbrev-all-buffers
+ vhdl-try-expand-abbrev)))
;; function for expanding parenthesis
-(defalias 'vhdl-expand-paren (make-hippie-expand-function
- '(try-expand-list
- try-expand-list-all-buffers)))
+(defun vhdl-expand-paren (arg))
+(fset 'vhdl-expand-paren (make-hippie-expand-function
+ '(try-expand-list
+ try-expand-list-all-buffers)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Line handling functions
(skip-syntax-backward " ")
(skip-syntax-backward "w_")
(skip-syntax-backward " ")))
-; (skip-chars-backward "^-(\n\";")
(goto-char (match-end 1)) (1 font-lock-variable-name-face)))
;; highlight formal parameters in component instantiations and subprogram
non-final)
"Scan contents of VHDL files in directory or file pattern NAME."
(string-match "\\(.*[/\\]\\)\\(.*\\)" name)
-; (unless (file-directory-p (match-string 1 name))
-; (message "No such directory: \"%s\"" (match-string 1 name)))
(let* ((dir-name (match-string 1 name))
(file-pattern (match-string 2 name))
(is-directory (= 0 (length file-pattern)))
"\\(\\(for\\|if\\)\\>[^;:]+\\<generate\\>\\|block\\>\\)\\)\\|"
"\\(^[ \t]*end[ \t\n\r\f]+\\(generate\\|block\\)\\>\\)") end-of-unit t)
(or (not limit-hier-inst-no)
- (<= (setq inst-no (1+ inst-no))
+ (<= (if (or (match-string 14)
+ (match-string 16))
+ inst-no
+ (setq inst-no (1+ inst-no)))
limit-hier-inst-no)))
(cond
;; block/generate beginning found
(setq level (1+ level)))
(when (member ent-key ent-hier)
(error "ERROR: Instantiation loop detected, component instantiates itself: \"%s\"" ent-key))
- ;; check configured architecture (already checked during scanning)
-; (unless (or (null conf-inst-alist) (assoc arch-key (nth 3 ent-entry)))
-; (vhdl-warning-when-idle "Configuration for non-existing architecture used: \"%s\"" conf-key))
;; process all instances
(while inst-alist
(setq inst-entry (car inst-alist)
(defun vhdl-speedbar-initialize ()
"Initialize speedbar."
;; general settings
-; (set (make-local-variable 'speedbar-tag-hierarchy-method) nil)
;; VHDL file extensions (extracted from `auto-mode-alist')
(let ((mode-alist auto-mode-alist))
(while mode-alist
(append
'(("vhdl directory" vhdl-speedbar-update-current-unit)
("vhdl project" vhdl-speedbar-update-current-project
- vhdl-speedbar-update-current-unit)
-; ("files" (lambda () (setq speedbar-ignored-path-regexp
-; (speedbar-extension-list-to-regex
-; speedbar-ignored-path-expressions))))
- )
+ vhdl-speedbar-update-current-unit))
speedbar-stealthy-function-list))
(when (eq vhdl-speedbar-display-mode 'directory)
(setq speedbar-initial-expansion-list-name "vhdl directory"))
(concat "^\\([0-9]+:\\s-*<\\)[+]>\\s-+" (caar project-alist) "$") nil t)
(goto-char (match-end 1))
(speedbar-do-function-pointer)))
- (setq project-alist (cdr project-alist))))
-; (vhdl-speedbar-update-current-project)
-; (vhdl-speedbar-update-current-unit nil t)
- )
+ (setq project-alist (cdr project-alist)))))
(defun vhdl-speedbar-insert-project-hierarchy (project indent &optional rescan)
"Insert hierarchy of PROJECT. Rescan directories if RESCAN is non-nil,
(let ((buffer (get-file-buffer (car token))))
(speedbar-find-file-in-frame (car token))
(when (or vhdl-speedbar-jump-to-unit buffer)
- (vhdl-goto-line (cdr token))
+ (goto-char (point-min))
+ (forward-line (1- (cdr token)))
(recenter))
(vhdl-speedbar-update-current-unit t t)
(speedbar-set-timer dframe-update-speed)
(let ((token (get-text-property
(match-beginning 3) 'speedbar-token)))
(vhdl-visit-file (car token) t
- (progn (vhdl-goto-line (cdr token))
+ (progn (goto-char (point-min))
+ (forward-line (1- (cdr token)))
(end-of-line)
(if is-entity
(vhdl-port-copy)
;; add speedbar
(when (fboundp 'speedbar)
- (condition-case ()
- (when (and vhdl-speedbar-auto-open
- (not (and (boundp 'speedbar-frame)
- (frame-live-p speedbar-frame))))
- (speedbar-frame-mode 1)
- (if (fboundp 'speedbar-select-attached-frame)
- (speedbar-select-attached-frame)
- (select-frame speedbar-attached-frame)))
- (error (vhdl-warning-when-idle "ERROR: An error occurred while opening speedbar"))))
+ (let ((current-frame (selected-frame)))
+ (condition-case ()
+ (when (and vhdl-speedbar-auto-open
+ (not (and (boundp 'speedbar-frame)
+ (frame-live-p speedbar-frame))))
+ (speedbar-frame-mode 1))
+ (error (vhdl-warning-when-idle "ERROR: An error occurred while opening speedbar")))
+ (select-frame current-frame)))
;; initialize speedbar
(if (not (boundp 'speedbar-frame))
;; insert component declarations
(while ent-alist
(vhdl-visit-file (nth 2 (car ent-alist)) nil
- (progn (vhdl-goto-line (nth 3 (car ent-alist)))
+ (progn (goto-char (point-min))
+ (forward-line (1- (nth 3 (car ent-alist))))
(end-of-line)
(vhdl-port-copy)))
(goto-char component-pos)
(ent-alist (aget vhdl-entity-alist (or project directory) t))
(conf-alist (aget vhdl-config-alist (or project directory) t))
(pack-alist (aget vhdl-package-alist (or project directory) t))
- (regexp-list (nth 12 (aget vhdl-compiler-alist vhdl-compiler)))
- (ent-regexp (cons "\\(.*\\)" (nth 0 regexp-list)))
- (arch-regexp (cons "\\(.*\\) \\(.*\\)" (nth 1 regexp-list)))
- (conf-regexp (cons "\\(.*\\)" (nth 2 regexp-list)))
- (pack-regexp (cons "\\(.*\\)" (nth 3 regexp-list)))
- (pack-body-regexp (cons "\\(.*\\)" (nth 4 regexp-list)))
+ (regexp-list (or (nth 12 (aget vhdl-compiler-alist vhdl-compiler))
+ '("\\1.vhd" "\\2_\\1.vhd" "\\1.vhd"
+ "\\1.vhd" "\\1_body.vhd" identity)))
+ (mapping-exist
+ (if (nth 12 (aget vhdl-compiler-alist vhdl-compiler)) t nil))
+ (ent-regexp (cons "\\(.*\\) \\(.*\\) \\(.*\\)" (nth 0 regexp-list)))
+ (arch-regexp (cons "\\(.*\\) \\(.*\\) \\(.*\\)" (nth 1 regexp-list)))
+ (conf-regexp (cons "\\(.*\\) \\(.*\\) \\(.*\\)" (nth 2 regexp-list)))
+ (pack-regexp (cons "\\(.*\\) \\(.*\\) \\(.*\\)" (nth 3 regexp-list)))
+ (pack-body-regexp (cons "\\(.*\\) \\(.*\\) \\(.*\\)" (nth 4 regexp-list)))
(adjust-case (nth 5 regexp-list))
(work-library (downcase (vhdl-work-library)))
(compile-directory (expand-file-name (vhdl-compile-directory)
;; check prerequisites
(unless (file-exists-p compile-directory)
(make-directory compile-directory t))
- (unless regexp-list
- (error "Please contact the VHDL Mode maintainer for support of \"%s\""
- vhdl-compiler))
+ (unless mapping-exist
+ (vhdl-warning
+ (format "No unit-to-file name mapping found for compiler \"%s\".\n Directory of dummy files is created instead (to be used as dependencies).\n Please contact the VHDL Mode maintainer for full support of \"%s\""
+ vhdl-compiler vhdl-compiler) t))
(message "Generating makefile \"%s\"..." makefile-name)
;; rules for all entities
(setq tmp-list ent-alist)
second-list nil
subcomp-list nil)
(setq tmp-key (vhdl-replace-string
- ent-regexp (funcall adjust-case ent-key)))
+ ent-regexp
+ (funcall adjust-case
+ (concat ent-key " " work-library))))
(push (cons ent-key tmp-key) unit-list)
;; rule target for this entity
(push ent-key target-list)
depend-list (nth 1 rule))
(setq tmp-key (vhdl-replace-string
arch-regexp
- (funcall adjust-case (concat arch-key " " ent-key))))
+ (funcall adjust-case
+ (concat arch-key " " ent-key " "
+ work-library))))
(setq unit-list
(cons (cons ent-arch-key tmp-key) unit-list))
(push ent-arch-key second-list)
depend-list (nth 1 rule)
subcomp-list (list ent-key))
(setq tmp-key (vhdl-replace-string
- conf-regexp (funcall adjust-case conf-key)))
+ conf-regexp
+ (funcall adjust-case
+ (concat conf-key " " work-library))))
(push (cons conf-key tmp-key) unit-list)
;; rule target for this configuration
(push conf-key target-list)
(while inst-alist
(setq inst-entry (car inst-alist))
(setq inst-ent-key (nth 2 inst-entry)
-; comp-arch-key (nth 2 inst-entry))
inst-conf-key (nth 4 inst-entry))
(when (equal (downcase (nth 5 inst-entry)) work-library)
(when inst-ent-key
(setq depend-list (cons inst-ent-key depend-list)
subcomp-list (cons inst-ent-key subcomp-list)))
-; (when comp-arch-key
-; (push (concat comp-ent-key "-" comp-arch-key) depend-list))
(when inst-conf-key
(setq depend-list (cons inst-conf-key depend-list)
subcomp-list (cons inst-conf-key subcomp-list))))
rule (aget rule-alist pack-file-name)
target-list (nth 0 rule) depend-list (nth 1 rule))
(setq tmp-key (vhdl-replace-string
- pack-regexp (funcall adjust-case pack-key)))
+ pack-regexp
+ (funcall adjust-case
+ (concat pack-key " " work-library))))
(push (cons pack-key tmp-key) unit-list)
;; rule target for this package
(push pack-key target-list)
target-list (nth 0 rule)
depend-list (nth 1 rule))
(setq tmp-key (vhdl-replace-string
- pack-body-regexp (funcall adjust-case pack-key)))
+ pack-body-regexp
+ (funcall adjust-case
+ (concat pack-key " " work-library))))
(setq unit-list
(cons (cons pack-body-key tmp-key) unit-list))
;; rule target for this package's body
compile-directory))))
(insert "\n\n# Define library paths\n"
"\nLIBRARY-" work-library " = " library-directory "\n")
+ (unless mapping-exist
+ (insert "LIBRARY-" work-library "-make = " "$(LIBRARY-" work-library
+ ")/make" "\n"))
;; insert variable definitions for all library unit files
(insert "\n\n# Define library unit files\n")
(setq tmp-list unit-list)
(while unit-list
(insert "\nUNIT-" work-library "-" (caar unit-list)
- " = \\\n\t$(LIBRARY-" work-library ")/" (cdar unit-list))
+ " = \\\n\t$(LIBRARY-" work-library
+ (if mapping-exist "" "-make") ")/" (cdar unit-list))
(setq unit-list (cdr unit-list)))
;; insert variable definition for list of all library unit files
(insert "\n\n\n# Define list of all library unit files\n"
;; insert `make library' rule
(insert "\n\n# Rule for creating library directory\n"
"\n" (nth 2 vhdl-makefile-default-targets) " :"
- " \\\n\t\t$(LIBRARY-" work-library ")\n"
+ " \\\n\t\t$(LIBRARY-" work-library ")"
+ (if mapping-exist ""
+ (concat " \\\n\t\t$(LIBRARY-" work-library "-make)\n"))
+ "\n"
"\n$(LIBRARY-" work-library ") :"
"\n\t"
(vhdl-replace-string
(cons "\\(.*\\)\n\\(.*\\)" (nth 5 compiler))
(concat "$(LIBRARY-" work-library ")\n" (vhdl-work-library)))
"\n")
+ (unless mapping-exist
+ (insert "\n$(LIBRARY-" work-library "-make) :"
+ "\n\t"
+ "mkdir -p $(LIBRARY-" work-library "-make)\n"))
;; insert '.PHONY' declaration
(insert "\n\n.PHONY : "
(nth 0 vhdl-makefile-default-targets) " "
(nth 0 rule)
(if (equal vhdl-compile-post-command "") ""
" $(POST-COMPILE)") "\n")
+ (insert "\n"))
+ (unless (and options mapping-exist)
(setq tmp-list target-list)
(while target-list
- (insert "\n\t@touch $(UNIT-" work-library "-" (car target-list) ")"
- (if (cdr target-list) " \\" "\n"))
+ (insert "\t@touch $(UNIT-" work-library "-" (car target-list) ")\n")
(setq target-list (cdr target-list)))
(setq target-list tmp-list))
(setq rule-alist (cdr rule-alist)))
+
(insert "\n\n### " makefile-name " ends here\n")
;; run Makefile generation hook
(run-hooks 'vhdl-makefile-generation-hook)
(progn (save-buffer)
(kill-buffer (current-buffer))
(set-buffer orig-buffer)
- (add-to-history 'file-name-history makefile-path-name))
+ (when (fboundp 'add-to-history)
+ (add-to-history 'file-name-history makefile-path-name)))
(vhdl-warning-when-idle
(format "File not writable: \"%s\""
(abbreviate-file-name makefile-path-name)))