emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/progmodes/vhdl-mode.el


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/progmodes/vhdl-mode.el
Date: Tue, 14 Jun 2005 19:56:27 -0400

Index: emacs/lisp/progmodes/vhdl-mode.el
diff -c emacs/lisp/progmodes/vhdl-mode.el:1.32 
emacs/lisp/progmodes/vhdl-mode.el:1.33
*** emacs/lisp/progmodes/vhdl-mode.el:1.32      Tue Jun 14 15:31:10 2005
--- emacs/lisp/progmodes/vhdl-mode.el   Tue Jun 14 23:56:26 2005
***************
*** 1379,1389 ****
  (defcustom vhdl-highlight-keywords t
    "*Non-nil means highlight VHDL keywords and other standardized words.
  The following faces are used:
!   `font-lock-keyword-face'       : keywords
!   `font-lock-type-face'          : standardized types
!   `vhdl-font-lock-attribute-face': standardized attributes
!   `vhdl-font-lock-enumvalue-face': standardized enumeration values
!   `vhdl-font-lock-function-face' : standardized function and package names
  
  NOTE: Activate the new setting in a VHDL buffer by re-fontifying it (menu
        entry \"Fontify Buffer\")."
--- 1379,1389 ----
  (defcustom vhdl-highlight-keywords t
    "*Non-nil means highlight VHDL keywords and other standardized words.
  The following faces are used:
!   `font-lock-keyword-face'      : keywords
!   `font-lock-type'            : standardized types
!   `vhdl-attribute'            : standardized attributes
!   `vhdl-enumvalue'            : standardized enumeration values
!   `vhdl-function'             : standardized function and package names
  
  NOTE: Activate the new setting in a VHDL buffer by re-fontifying it (menu
        entry \"Fontify Buffer\")."
***************
*** 1398,1404 ****
    `font-lock-function-name-face' : names in declarations of units,
       subprograms, components, as well as labels of VHDL constructs
    `font-lock-type-face'          : names in type/nature declarations
!   `vhdl-font-lock-attribute-face': names in attribute declarations
    `font-lock-variable-name-face' : names in declarations of signals,
       variables, constants, subprogram parameters, generics, and ports
  
--- 1398,1404 ----
    `font-lock-function-name-face' : names in declarations of units,
       subprograms, components, as well as labels of VHDL constructs
    `font-lock-type-face'          : names in type/nature declarations
!   `vhdl-attribute'             : names in attribute declarations
    `font-lock-variable-name-face' : names in declarations of signals,
       variables, constants, subprogram parameters, generics, and ports
  
***************
*** 1426,1432 ****
    "*Non-nil means highlight forbidden words.
  The reserved words specified in option `vhdl-forbidden-words' or having the
  syntax specified in option `vhdl-forbidden-syntax' are highlighted in a
! warning color (face `vhdl-font-lock-reserved-words-face') to indicate not to
  use them.
  
  NOTE: Activate the new setting in a VHDL buffer by re-fontifying it (menu
--- 1426,1432 ----
    "*Non-nil means highlight forbidden words.
  The reserved words specified in option `vhdl-forbidden-words' or having the
  syntax specified in option `vhdl-forbidden-syntax' are highlighted in a
! warning color (face `vhdl-reserved-word') to indicate not to
  use them.
  
  NOTE: Activate the new setting in a VHDL buffer by re-fontifying it (menu
***************
*** 1440,1446 ****
  (defcustom vhdl-highlight-verilog-keywords nil
    "*Non-nil means highlight Verilog keywords as reserved words.
  Verilog keywords are highlighted in a warning color (face
! `vhdl-font-lock-reserved-words-face') to indicate not to use them.
  
  NOTE: Activate the new setting in a VHDL buffer by re-fontifying it (menu
        entry \"Fontify Buffer\")."
--- 1440,1446 ----
  (defcustom vhdl-highlight-verilog-keywords nil
    "*Non-nil means highlight Verilog keywords as reserved words.
  Verilog keywords are highlighted in a warning color (face
! `vhdl-reserved-word') to indicate not to use them.
  
  NOTE: Activate the new setting in a VHDL buffer by re-fontifying it (menu
        entry \"Fontify Buffer\")."
***************
*** 1454,1460 ****
    "*Non-nil means background-highlight code excluded from translation.
  That is, all code between \"-- pragma translate_off\" and
  \"-- pragma translate_on\" is highlighted using a different background color
! \(face `vhdl-font-lock-translate-off-face').
  Note: this might slow down on-the-fly fontification (and thus editing).
  
  NOTE: Activate the new setting in a VHDL buffer by re-fontifying it (menu
--- 1454,1460 ----
    "*Non-nil means background-highlight code excluded from translation.
  That is, all code between \"-- pragma translate_off\" and
  \"-- pragma translate_on\" is highlighted using a different background color
! \(face `vhdl-translate-off').
  Note: this might slow down on-the-fly fontification (and thus editing).
  
  NOTE: Activate the new setting in a VHDL buffer by re-fontifying it (menu
***************
*** 1501,1507 ****
  \"Signal_s\", \"Variable_v\", \"Constant_c\") by distinguishing them using
  common substrings or name suffices.
  For each entry, a new face is generated with the specified colors and name
! \"vhdl-font-lock-\" + name + \"-face\".
  
  NOTE: Activate a changed regexp in a VHDL buffer by re-fontifying it (menu
        entry \"Fontify Buffer\").  All other changes require restarting Emacs."
--- 1501,1507 ----
  \"Signal_s\", \"Variable_v\", \"Constant_c\") by distinguishing them using
  common substrings or name suffices.
  For each entry, a new face is generated with the specified colors and name
! \"vhdl-\" + name.
  
  NOTE: Activate a changed regexp in a VHDL buffer by re-fontifying it (menu
        entry \"Fontify Buffer\").  All other changes require restarting Emacs."
***************
*** 12484,12490 ****
     (list
      (concat
       "^\\s-*attribute\\s-+\\(\\w+\\)")
!     1 'vhdl-font-lock-attribute-face)
  
     ;; highlight type/nature name in (sub)type/(sub)nature declarations
     (list
--- 12484,12490 ----
     (list
      (concat
       "^\\s-*attribute\\s-+\\(\\w+\\)")
!     1 'vhdl-attribute)
  
     ;; highlight type/nature name in (sub)type/(sub)nature declarations
     (list
***************
*** 12542,12581 ****
  
  (defconst vhdl-font-lock-keywords-5
    ;; background highlight translate-off regions
!   '((vhdl-match-translate-off (0 vhdl-font-lock-translate-off-face append)))
    "For consideration as a value of `vhdl-font-lock-keywords'.
  This does background highlighting of translate-off regions.")
  
  
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;; Font and color definitions
  
! (defvar vhdl-font-lock-prompt-face         'vhdl-font-lock-prompt-face
    "Face name to use for prompts.")
  
! (defvar vhdl-font-lock-attribute-face      'vhdl-font-lock-attribute-face
    "Face name to use for standardized attributes.")
  
! (defvar vhdl-font-lock-enumvalue-face      'vhdl-font-lock-enumvalue-face
    "Face name to use for standardized enumeration values.")
  
! (defvar vhdl-font-lock-function-face       'vhdl-font-lock-function-face
    "Face name to use for standardized functions and packages.")
  
! (defvar vhdl-font-lock-directive-face      'vhdl-font-lock-directive-face
    "Face name to use for directives.")
  
! (defvar vhdl-font-lock-reserved-words-face 'vhdl-font-lock-reserved-words-face
    "Face name to use for additional reserved words.")
  
! (defvar vhdl-font-lock-translate-off-face  'vhdl-font-lock-translate-off-face
    "Face name to use for translate-off regions.")
  
  ;; face names to use for words with special syntax.
  (let ((syntax-alist vhdl-special-syntax-alist)
        name)
    (while syntax-alist
!     (setq name (vhdl-function-name
!               "vhdl-font-lock" (nth 0 (car syntax-alist)) "face"))
      (eval `(defvar ,name ',name
             ,(concat "Face name to use for "
                      (nth 0 (car syntax-alist)) ".")))
--- 12542,12580 ----
  
  (defconst vhdl-font-lock-keywords-5
    ;; background highlight translate-off regions
!   '((vhdl-match-translate-off (0 vhdl-translate-off-face append)))
    "For consideration as a value of `vhdl-font-lock-keywords'.
  This does background highlighting of translate-off regions.")
  
  
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;; Font and color definitions
  
! (defvar vhdl-prompt-face         'vhdl-prompt
    "Face name to use for prompts.")
  
! (defvar vhdl-attribute-face      'vhdl-attribute
    "Face name to use for standardized attributes.")
  
! (defvar vhdl-enumvalue-face      'vhdl-enumvalue
    "Face name to use for standardized enumeration values.")
  
! (defvar vhdl-function-face       'vhdl-function
    "Face name to use for standardized functions and packages.")
  
! (defvar vhdl-directive-face      'vhdl-directive
    "Face name to use for directives.")
  
! (defvar vhdl-reserved-words-face 'vhdl-reserved-words
    "Face name to use for additional reserved words.")
  
! (defvar vhdl-translate-off-face  'vhdl-translate-off
    "Face name to use for translate-off regions.")
  
  ;; face names to use for words with special syntax.
  (let ((syntax-alist vhdl-special-syntax-alist)
        name)
    (while syntax-alist
!     (setq name (vhdl-function-name "vhdl" (nth 0 (car syntax-alist))))
      (eval `(defvar ,name ',name
             ,(concat "Face name to use for "
                      (nth 0 (car syntax-alist)) ".")))
***************
*** 12599,12605 ****
  (custom-add-to-group
   'vhdl-highlight-faces 'font-lock-variable-name-face 'custom-face)
  
! (defface vhdl-font-lock-prompt-face
    '((((min-colors 88) (class color) (background light))
       (:foreground "Red1" :bold t))
      (((class color) (background light)) (:foreground "Red" :bold t))
--- 12598,12604 ----
  (custom-add-to-group
   'vhdl-highlight-faces 'font-lock-variable-name-face 'custom-face)
  
! (defface vhdl-prompt
    '((((min-colors 88) (class color) (background light))
       (:foreground "Red1" :bold t))
      (((class color) (background light)) (:foreground "Red" :bold t))
***************
*** 12608,12647 ****
    "Font lock mode face used to highlight prompts."
    :group 'vhdl-highlight-faces
    :group 'font-lock-highlighting-faces)
  
! (defface vhdl-font-lock-attribute-face
    '((((class color) (background light)) (:foreground "Orchid"))
      (((class color) (background dark)) (:foreground "LightSteelBlue"))
      (t (:italic t :bold t)))
    "Font lock mode face used to highlight standardized attributes."
    :group 'vhdl-highlight-faces
    :group 'font-lock-highlighting-faces)
  
! (defface vhdl-font-lock-enumvalue-face
    '((((class color) (background light)) (:foreground "SaddleBrown"))
      (((class color) (background dark)) (:foreground "BurlyWood"))
      (t (:italic t :bold t)))
    "Font lock mode face used to highlight standardized enumeration values."
    :group 'vhdl-highlight-faces
    :group 'font-lock-highlighting-faces)
  
! (defface vhdl-font-lock-function-face
    '((((class color) (background light)) (:foreground "Cyan4"))
      (((class color) (background dark)) (:foreground "Orchid1"))
      (t (:italic t :bold t)))
    "Font lock mode face used to highlight standardized functions and packages."
    :group 'vhdl-highlight-faces
    :group 'font-lock-highlighting-faces)
  
! (defface vhdl-font-lock-directive-face
    '((((class color) (background light)) (:foreground "CadetBlue"))
      (((class color) (background dark)) (:foreground "Aquamarine"))
      (t (:italic t :bold t)))
    "Font lock mode face used to highlight directives."
    :group 'vhdl-highlight-faces
    :group 'font-lock-highlighting-faces)
  
! (defface vhdl-font-lock-reserved-words-face
    '((((class color) (background light)) (:foreground "Orange" :bold t))
      (((min-colors 88) (class color) (background dark))
       (:foreground "Yellow1" :bold t))
--- 12607,12656 ----
    "Font lock mode face used to highlight prompts."
    :group 'vhdl-highlight-faces
    :group 'font-lock-highlighting-faces)
+ ;; backward-compatibility alias
+ (put 'vhdl-font-lock-prompt-face 'face-alias 'vhdl-prompt)
  
! (defface vhdl-attribute
    '((((class color) (background light)) (:foreground "Orchid"))
      (((class color) (background dark)) (:foreground "LightSteelBlue"))
      (t (:italic t :bold t)))
    "Font lock mode face used to highlight standardized attributes."
    :group 'vhdl-highlight-faces
    :group 'font-lock-highlighting-faces)
+ ;; backward-compatibility alias
+ (put 'vhdl-font-lock-attribute-face 'face-alias 'vhdl-attribute)
  
! (defface vhdl-enumvalue
    '((((class color) (background light)) (:foreground "SaddleBrown"))
      (((class color) (background dark)) (:foreground "BurlyWood"))
      (t (:italic t :bold t)))
    "Font lock mode face used to highlight standardized enumeration values."
    :group 'vhdl-highlight-faces
    :group 'font-lock-highlighting-faces)
+ ;; backward-compatibility alias
+ (put 'vhdl-font-lock-enumvalue-face 'face-alias 'vhdl-enumvalue)
  
! (defface vhdl-function
    '((((class color) (background light)) (:foreground "Cyan4"))
      (((class color) (background dark)) (:foreground "Orchid1"))
      (t (:italic t :bold t)))
    "Font lock mode face used to highlight standardized functions and packages."
    :group 'vhdl-highlight-faces
    :group 'font-lock-highlighting-faces)
+ ;; backward-compatibility alias
+ (put 'vhdl-font-lock-function-face 'face-alias 'vhdl-function)
  
! (defface vhdl-directive
    '((((class color) (background light)) (:foreground "CadetBlue"))
      (((class color) (background dark)) (:foreground "Aquamarine"))
      (t (:italic t :bold t)))
    "Font lock mode face used to highlight directives."
    :group 'vhdl-highlight-faces
    :group 'font-lock-highlighting-faces)
+ ;; backward-compatibility alias
+ (put 'vhdl-font-lock-directive-face 'face-alias 'vhdl-directive)
  
! (defface vhdl-reserved-word
    '((((class color) (background light)) (:foreground "Orange" :bold t))
      (((min-colors 88) (class color) (background dark))
       (:foreground "Yellow1" :bold t))
***************
*** 12650,12669 ****
    "Font lock mode face used to highlight additional reserved words."
    :group 'vhdl-highlight-faces
    :group 'font-lock-highlighting-faces)
  
! (defface vhdl-font-lock-translate-off-face
    '((((class color) (background light)) (:background "LightGray"))
      (((class color) (background dark)) (:background "DimGray"))
      (t ()))
    "Font lock mode face used to background highlight translate-off regions."
    :group 'vhdl-highlight-faces
    :group 'font-lock-highlighting-faces)
  
  ;; font lock mode faces used to highlight words with special syntax.
  (let ((syntax-alist vhdl-special-syntax-alist))
    (while syntax-alist
!     (eval `(defface ,(vhdl-function-name
!                     "vhdl-font-lock" (caar syntax-alist) "face")
             '((((class color) (background light))
                (:foreground ,(nth 2 (car syntax-alist))))
               (((class color) (background dark))
--- 12659,12681 ----
    "Font lock mode face used to highlight additional reserved words."
    :group 'vhdl-highlight-faces
    :group 'font-lock-highlighting-faces)
+ ;; backward-compatibility alias
+ (put 'vhdl-font-lock-reserved-words-face 'face-alias 'vhdl-reserved-word)
  
! (defface vhdl-translate-off
    '((((class color) (background light)) (:background "LightGray"))
      (((class color) (background dark)) (:background "DimGray"))
      (t ()))
    "Font lock mode face used to background highlight translate-off regions."
    :group 'vhdl-highlight-faces
    :group 'font-lock-highlighting-faces)
+ ;; backward-compatibility alias
+ (put 'vhdl-font-lock-translate-off-face 'face-alias 'vhdl-translate-off)
  
  ;; font lock mode faces used to highlight words with special syntax.
  (let ((syntax-alist vhdl-special-syntax-alist))
    (while syntax-alist
!     (eval `(defface ,(vhdl-function-name "vhdl" (caar syntax-alist))
             '((((class color) (background light))
                (:foreground ,(nth 2 (car syntax-alist))))
               (((class color) (background dark))
***************
*** 12684,12703 ****
    (setq vhdl-font-lock-keywords-0
        (list (list (concat "\\(^\\|[ \t(.']\\)\\(<"
                            vhdl-template-prompt-syntax ">\\)")
!                   2 'vhdl-font-lock-prompt-face t)
              (list (concat "--\\s-*"
                            vhdl-directive-keywords-regexp "\\s-+\\(.*\\)$")
!                   2 'vhdl-font-lock-directive-face t)))
    ;; highlight keywords and standardized types, attributes, enumeration
    ;; values, and subprograms
    (setq vhdl-font-lock-keywords-1
        (list
!        (list (concat "'" vhdl-attributes-regexp)
!              1 'vhdl-font-lock-attribute-face)
         (list vhdl-types-regexp       1 'font-lock-type-face)
!        (list vhdl-functions-regexp   1 'vhdl-font-lock-function-face)
!        (list vhdl-packages-regexp    1 'vhdl-font-lock-function-face)
!        (list vhdl-enum-values-regexp 1 'vhdl-font-lock-enumvalue-face)
         (list vhdl-keywords-regexp    1 'font-lock-keyword-face)))
    ;; highlight words with special syntax.
    (setq vhdl-font-lock-keywords-3
--- 12696,12714 ----
    (setq vhdl-font-lock-keywords-0
        (list (list (concat "\\(^\\|[ \t(.']\\)\\(<"
                            vhdl-template-prompt-syntax ">\\)")
!                   2 'vhdl-prompt t)
              (list (concat "--\\s-*"
                            vhdl-directive-keywords-regexp "\\s-+\\(.*\\)$")
!                   2 'vhdl-directive t)))
    ;; highlight keywords and standardized types, attributes, enumeration
    ;; values, and subprograms
    (setq vhdl-font-lock-keywords-1
        (list
!        (list (concat "'" vhdl-attributes-regexp) 1 'vhdl-attribute)
         (list vhdl-types-regexp       1 'font-lock-type-face)
!        (list vhdl-functions-regexp   1 'vhdl-function)
!        (list vhdl-packages-regexp    1 'vhdl-function)
!        (list vhdl-enum-values-regexp 1 'vhdl-enumvalue)
         (list vhdl-keywords-regexp    1 'font-lock-keyword-face)))
    ;; highlight words with special syntax.
    (setq vhdl-font-lock-keywords-3
***************
*** 12708,12721 ****
                  (cons
                   (cons (concat "\\<\\(" (nth 1 (car syntax-alist)) "\\)\\>")
                         (vhdl-function-name
!                         "vhdl-font-lock" (nth 0 (car syntax-alist)) "face"))
                   keywords))
            (setq syntax-alist (cdr syntax-alist)))
          keywords))
    ;; highlight additional reserved words
    (setq vhdl-font-lock-keywords-4
!       (list (list vhdl-reserved-words-regexp 1
!                   'vhdl-font-lock-reserved-words-face)))
    ;; highlight everything together
    (setq vhdl-font-lock-keywords
        (append
--- 12719,12731 ----
                  (cons
                   (cons (concat "\\<\\(" (nth 1 (car syntax-alist)) "\\)\\>")
                         (vhdl-function-name
!                         "vhdl" (nth 0 (car syntax-alist))))
                   keywords))
            (setq syntax-alist (cdr syntax-alist)))
          keywords))
    ;; highlight additional reserved words
    (setq vhdl-font-lock-keywords-4
!       (list (list vhdl-reserved-words-regexp 1 'vhdl-reserved-word)))
    ;; highlight everything together
    (setq vhdl-font-lock-keywords
        (append
***************
*** 12753,12770 ****
    (unless (or (not vhdl-print-customize-faces)
              ps-print-color-p)
      (set (make-local-variable 'ps-bold-faces)
!        '(font-lock-keyword-face
!          font-lock-type-face
!          vhdl-font-lock-attribute-face
!          vhdl-font-lock-enumvalue-face
!          vhdl-font-lock-directive-face))
      (set (make-local-variable 'ps-italic-faces)
         '(font-lock-comment-face
!          font-lock-function-name-face
!          font-lock-type-face
!          vhdl-font-lock-attribute-face
!          vhdl-font-lock-enumvalue-face
!          vhdl-font-lock-directive-face))
      (set (make-local-variable 'ps-underlined-faces)
         '(font-lock-string-face))
      (setq ps-always-build-face-reference t))
--- 12763,12774 ----
    (unless (or (not vhdl-print-customize-faces)
              ps-print-color-p)
      (set (make-local-variable 'ps-bold-faces)
!        '(font-lock-keyword-face font-lock-type-face
!          vhdl-attribute vhdl-enumvalue vhdl-directive))
      (set (make-local-variable 'ps-italic-faces)
         '(font-lock-comment-face
!          font-lock-function-name-face font-lock-type-face
!          vhdl-attribute vhdl-enumvalue vhdl-directive))
      (set (make-local-variable 'ps-underlined-faces)
         '(font-lock-string-face))
      (setq ps-always-build-face-reference t))
***************
*** 13973,13979 ****
         'bracket ?+ 'vhdl-speedbar-expand-entity (nth 0 ent-entry)
         (nth 1 ent-entry) 'vhdl-speedbar-find-file
         (cons (nth 2 ent-entry) (nth 3 ent-entry))
!        'vhdl-speedbar-entity-face depth)
        (unless (nth 2 ent-entry)
          (end-of-line 0) (insert "!") (forward-char 1))
        (unless (member (nth 0 ent-entry) ent-inst-list)
--- 13977,13983 ----
         'bracket ?+ 'vhdl-speedbar-expand-entity (nth 0 ent-entry)
         (nth 1 ent-entry) 'vhdl-speedbar-find-file
         (cons (nth 2 ent-entry) (nth 3 ent-entry))
!        'vhdl-speedbar-entity depth)
        (unless (nth 2 ent-entry)
          (end-of-line 0) (insert "!") (forward-char 1))
        (unless (member (nth 0 ent-entry) ent-inst-list)
***************
*** 13987,13993 ****
         'bracket ?+ 'vhdl-speedbar-expand-config (nth 0 conf-entry)
         (nth 1 conf-entry) 'vhdl-speedbar-find-file
         (cons (nth 2 conf-entry) (nth 3 conf-entry))
!        'vhdl-speedbar-configuration-face depth)
        (setq conf-alist (cdr conf-alist)))
        ;; insert packages
        (when pack-alist (vhdl-speedbar-make-title-line "Packages:" depth))
--- 13991,13997 ----
         'bracket ?+ 'vhdl-speedbar-expand-config (nth 0 conf-entry)
         (nth 1 conf-entry) 'vhdl-speedbar-find-file
         (cons (nth 2 conf-entry) (nth 3 conf-entry))
!        'vhdl-speedbar-configuration depth)
        (setq conf-alist (cdr conf-alist)))
        ;; insert packages
        (when pack-alist (vhdl-speedbar-make-title-line "Packages:" depth))
***************
*** 14178,14184 ****
              (cons token (nth 0 arch-entry))
              (nth 1 arch-entry) 'vhdl-speedbar-find-file
              (cons (nth 2 arch-entry) (nth 3 arch-entry))
!             'vhdl-speedbar-architecture-face (1+ indent))
             (setq arch-alist (cdr arch-alist)))
           ;; insert instantiations
           (when inst-alist
--- 14182,14188 ----
              (cons token (nth 0 arch-entry))
              (nth 1 arch-entry) 'vhdl-speedbar-find-file
              (cons (nth 2 arch-entry) (nth 3 arch-entry))
!             'vhdl-speedbar-architecture (1+ indent))
             (setq arch-alist (cdr arch-alist)))
           ;; insert instantiations
           (when inst-alist
***************
*** 14361,14367 ****
               (cons token (nth 0 comp-entry))
               (nth 1 comp-entry) 'vhdl-speedbar-find-file
               (cons (nth 2 comp-entry) (nth 3 comp-entry))
!              'vhdl-speedbar-entity-face (1+ indent))
              (setq comp-alist (cdr comp-alist)))
            ;; insert subprograms
            (when func-alist
--- 14365,14371 ----
               (cons token (nth 0 comp-entry))
               (nth 1 comp-entry) 'vhdl-speedbar-find-file
               (cons (nth 2 comp-entry) (nth 3 comp-entry))
!              'vhdl-speedbar-entity (1+ indent))
              (setq comp-alist (cdr comp-alist)))
            ;; insert subprograms
            (when func-alist
***************
*** 14477,14519 ****
          (let* ((file-entry (aget file-alist speedbar-last-selected-file t)))
            (vhdl-speedbar-update-units
             "\\[.\\] " (nth 0 file-entry)
!            speedbar-last-selected-file 'vhdl-speedbar-entity-face)
            (vhdl-speedbar-update-units
             "{.} " (nth 1 file-entry)
!            speedbar-last-selected-file 'vhdl-speedbar-architecture-face)
            (vhdl-speedbar-update-units
             "\\[.\\] " (nth 3 file-entry)
!            speedbar-last-selected-file 'vhdl-speedbar-configuration-face)
            (vhdl-speedbar-update-units
             "[]>] " (nth 4 file-entry)
!            speedbar-last-selected-file 'vhdl-speedbar-package-face)
            (vhdl-speedbar-update-units
             "\\[.\\].+(" '("body")
!            speedbar-last-selected-file 'vhdl-speedbar-package-face)
            (vhdl-speedbar-update-units
             "> " (nth 6 file-entry)
!            speedbar-last-selected-file 'vhdl-speedbar-instantiation-face))
          ;; highlight current units
          (let* ((file-entry (aget file-alist file-name t)))
            (setq
             pos (vhdl-speedbar-update-units
                  "\\[.\\] " (nth 0 file-entry)
!                 file-name 'vhdl-speedbar-entity-selected-face pos)
             pos (vhdl-speedbar-update-units
                  "{.} " (nth 1 file-entry)
!                 file-name 'vhdl-speedbar-architecture-selected-face pos)
             pos (vhdl-speedbar-update-units
                  "\\[.\\] " (nth 3 file-entry)
!                 file-name 'vhdl-speedbar-configuration-selected-face pos)
             pos (vhdl-speedbar-update-units
                  "[]>] " (nth 4 file-entry)
!                 file-name 'vhdl-speedbar-package-selected-face pos)
             pos (vhdl-speedbar-update-units
                  "\\[.\\].+(" '("body")
!                 file-name 'vhdl-speedbar-package-selected-face pos)
             pos (vhdl-speedbar-update-units
                  "> " (nth 6 file-entry)
!                 file-name 'vhdl-speedbar-instantiation-selected-face pos))))))
        ;; move speedbar so the first highlighted unit is visible
        (when (and pos (not no-position))
        (goto-char pos)
--- 14481,14523 ----
          (let* ((file-entry (aget file-alist speedbar-last-selected-file t)))
            (vhdl-speedbar-update-units
             "\\[.\\] " (nth 0 file-entry)
!            speedbar-last-selected-file 'vhdl-speedbar-entity)
            (vhdl-speedbar-update-units
             "{.} " (nth 1 file-entry)
!            speedbar-last-selected-file 'vhdl-speedbar-architecture)
            (vhdl-speedbar-update-units
             "\\[.\\] " (nth 3 file-entry)
!            speedbar-last-selected-file 'vhdl-speedbar-configuration)
            (vhdl-speedbar-update-units
             "[]>] " (nth 4 file-entry)
!            speedbar-last-selected-file 'vhdl-speedbar-package)
            (vhdl-speedbar-update-units
             "\\[.\\].+(" '("body")
!            speedbar-last-selected-file 'vhdl-speedbar-package)
            (vhdl-speedbar-update-units
             "> " (nth 6 file-entry)
!            speedbar-last-selected-file 'vhdl-speedbar-instantiation))
          ;; highlight current units
          (let* ((file-entry (aget file-alist file-name t)))
            (setq
             pos (vhdl-speedbar-update-units
                  "\\[.\\] " (nth 0 file-entry)
!                 file-name 'vhdl-speedbar-entity-selected pos)
             pos (vhdl-speedbar-update-units
                  "{.} " (nth 1 file-entry)
!                 file-name 'vhdl-speedbar-architecture-selected pos)
             pos (vhdl-speedbar-update-units
                  "\\[.\\] " (nth 3 file-entry)
!                 file-name 'vhdl-speedbar-configuration-selected pos)
             pos (vhdl-speedbar-update-units
                  "[]>] " (nth 4 file-entry)
!                 file-name 'vhdl-speedbar-package-selected pos)
             pos (vhdl-speedbar-update-units
                  "\\[.\\].+(" '("body")
!                 file-name 'vhdl-speedbar-package-selected pos)
             pos (vhdl-speedbar-update-units
                  "> " (nth 6 file-entry)
!                 file-name 'vhdl-speedbar-instantiation-selected pos))))))
        ;; move speedbar so the first highlighted unit is visible
        (when (and pos (not no-position))
        (goto-char pos)
***************
*** 14564,14584 ****
        (insert "(top)")
        (insert inst-name)
        (speedbar-make-button
!        start (point) 'vhdl-speedbar-instantiation-face 
'speedbar-highlight-face
         'vhdl-speedbar-find-file inst-file-marker))
      (insert delimiter)
      (when ent-name
        (setq start (point))
        (insert ent-name)
        (speedbar-make-button
!        start (point) 'vhdl-speedbar-entity-face 'speedbar-highlight-face
         'vhdl-speedbar-find-file ent-file-marker)
        (when arch-name
        (insert " (")
        (setq start (point))
        (insert arch-name)
        (speedbar-make-button
!        start (point) 'vhdl-speedbar-architecture-face 'speedbar-highlight-face
         'vhdl-speedbar-find-file arch-file-marker)
        (insert ")"))
        (when conf-name
--- 14568,14588 ----
        (insert "(top)")
        (insert inst-name)
        (speedbar-make-button
!        start (point) 'vhdl-speedbar-instantiation 'speedbar-highlight-face
         'vhdl-speedbar-find-file inst-file-marker))
      (insert delimiter)
      (when ent-name
        (setq start (point))
        (insert ent-name)
        (speedbar-make-button
!        start (point) 'vhdl-speedbar-entity 'speedbar-highlight-face
         'vhdl-speedbar-find-file ent-file-marker)
        (when arch-name
        (insert " (")
        (setq start (point))
        (insert arch-name)
        (speedbar-make-button
!        start (point) 'vhdl-speedbar-architecture 'speedbar-highlight-face
         'vhdl-speedbar-find-file arch-file-marker)
        (insert ")"))
        (when conf-name
***************
*** 14586,14599 ****
        (setq start (point))
        (insert conf-name)
        (speedbar-make-button
!        start (point) 'vhdl-speedbar-configuration-face 
'speedbar-highlight-face
         'vhdl-speedbar-find-file conf-file-marker)
        (insert ")")))
      (when (and lib-name (not (equal lib-name (downcase (vhdl-work-library)))))
        (setq start (point))
        (insert " (" lib-name ")")
        (put-text-property (+ 2 start) (1- (point)) 'face
!                        'vhdl-speedbar-library-face))
      (insert-char ?\n 1)
      (put-text-property visible-start (point) 'invisible nil)))
  
--- 14590,14603 ----
        (setq start (point))
        (insert conf-name)
        (speedbar-make-button
!        start (point) 'vhdl-speedbar-configuration 'speedbar-highlight-face
         'vhdl-speedbar-find-file conf-file-marker)
        (insert ")")))
      (when (and lib-name (not (equal lib-name (downcase (vhdl-work-library)))))
        (setq start (point))
        (insert " (" lib-name ")")
        (put-text-property (+ 2 start) (1- (point)) 'face
!                        'vhdl-speedbar-library))
      (insert-char ?\n 1)
      (put-text-property visible-start (point) 'invisible nil)))
  
***************
*** 14617,14623 ****
      (setq start (point))
      (insert pack-name)
      (speedbar-make-button
!      start (point) 'vhdl-speedbar-package-face 'speedbar-highlight-face
       'vhdl-speedbar-find-file pack-file-marker)
      (unless (car pack-file-marker)
        (insert "!"))
--- 14621,14627 ----
      (setq start (point))
      (insert pack-name)
      (speedbar-make-button
!      start (point) 'vhdl-speedbar-package 'speedbar-highlight-face
       'vhdl-speedbar-find-file pack-file-marker)
      (unless (car pack-file-marker)
        (insert "!"))
***************
*** 14626,14632 ****
        (setq start (point))
        (insert "body")
        (speedbar-make-button
!        start (point) 'vhdl-speedbar-package-face 'speedbar-highlight-face
         'vhdl-speedbar-find-file body-file-marker)
        (insert ")"))
      (insert-char ?\n 1)
--- 14630,14636 ----
        (setq start (point))
        (insert "body")
        (speedbar-make-button
!        start (point) 'vhdl-speedbar-package 'speedbar-highlight-face
         'vhdl-speedbar-find-file body-file-marker)
        (insert ")"))
      (insert-char ?\n 1)
***************
*** 14650,14661 ****
      (setq start (point))
      (insert pack-name)
      (speedbar-make-button
!      start (point) 'vhdl-speedbar-package-face 'speedbar-highlight-face
       'vhdl-speedbar-find-file pack-file-marker)
      (setq start (point))
      (insert " (" lib-name ")")
      (put-text-property (+ 2 start) (1- (point)) 'face
!                      'vhdl-speedbar-library-face)
      (insert-char ?\n 1)
      (put-text-property visible-start (point) 'invisible nil)))
  
--- 14654,14665 ----
      (setq start (point))
      (insert pack-name)
      (speedbar-make-button
!      start (point) 'vhdl-speedbar-package 'speedbar-highlight-face
       'vhdl-speedbar-find-file pack-file-marker)
      (setq start (point))
      (insert " (" lib-name ")")
      (put-text-property (+ 2 start) (1- (point)) 'face
!                      'vhdl-speedbar-library)
      (insert-char ?\n 1)
      (put-text-property visible-start (point) 'invisible nil)))
  
***************
*** 14678,14691 ****
      (setq start (point))
      (insert func-name)
      (speedbar-make-button
!      start (point) 'vhdl-speedbar-subprogram-face 'speedbar-highlight-face
       'vhdl-speedbar-find-file func-file-marker)
      (when (car func-body-file-marker)
        (insert " (")
        (setq start (point))
        (insert "body")
        (speedbar-make-button
!        start (point) 'vhdl-speedbar-subprogram-face 'speedbar-highlight-face
         'vhdl-speedbar-find-file func-body-file-marker)
        (insert ")"))
      (insert-char ?\n 1)
--- 14682,14695 ----
      (setq start (point))
      (insert func-name)
      (speedbar-make-button
!      start (point) 'vhdl-speedbar-subprogram 'speedbar-highlight-face
       'vhdl-speedbar-find-file func-file-marker)
      (when (car func-body-file-marker)
        (insert " (")
        (setq start (point))
        (insert "body")
        (speedbar-make-button
!        start (point) 'vhdl-speedbar-subprogram 'speedbar-highlight-face
         'vhdl-speedbar-find-file func-body-file-marker)
        (insert ")"))
      (insert-char ?\n 1)
***************
*** 14773,14794 ****
        (message
         "%s \"%s\" in \"%s\""
         ;; design unit kind
!        (cond ((or (eq face 'vhdl-speedbar-entity-face)
!                   (eq face 'vhdl-speedbar-entity-selected-face))
                (if (equal (match-string 2) ">") "Component" "Entity"))
!              ((or (eq face 'vhdl-speedbar-architecture-face)
!                   (eq face 'vhdl-speedbar-architecture-selected-face))
                "Architecture")
!              ((or (eq face 'vhdl-speedbar-configuration-face)
!                   (eq face 'vhdl-speedbar-configuration-selected-face))
                "Configuration")
!              ((or (eq face 'vhdl-speedbar-package-face)
!                   (eq face 'vhdl-speedbar-package-selected-face))
                "Package")
!              ((or (eq face 'vhdl-speedbar-instantiation-face)
!                   (eq face 'vhdl-speedbar-instantiation-selected-face))
                "Instantiation")
!              ((eq face 'vhdl-speedbar-subprogram-face)
                "Subprogram")
               (t ""))
         ;; design unit name
--- 14777,14798 ----
        (message
         "%s \"%s\" in \"%s\""
         ;; design unit kind
!        (cond ((or (eq face 'vhdl-speedbar-entity)
!                   (eq face 'vhdl-speedbar-entity-selected))
                (if (equal (match-string 2) ">") "Component" "Entity"))
!              ((or (eq face 'vhdl-speedbar-architecture)
!                   (eq face 'vhdl-speedbar-architecture-selected))
                "Architecture")
!              ((or (eq face 'vhdl-speedbar-configuration)
!                   (eq face 'vhdl-speedbar-configuration-selected))
                "Configuration")
!              ((or (eq face 'vhdl-speedbar-package)
!                   (eq face 'vhdl-speedbar-package-selected))
                "Package")
!              ((or (eq face 'vhdl-speedbar-instantiation)
!                   (eq face 'vhdl-speedbar-instantiation-selected))
                "Instantiation")
!              ((eq face 'vhdl-speedbar-subprogram)
                "Subprogram")
               (t ""))
         ;; design unit name
***************
*** 14964,14974 ****
        (speedbar-position-cursor-on-line)
        (cond ((eq design-unit 'entity)
             (memq (get-text-property (match-end 0) 'face)
!                  '(vhdl-speedbar-entity-face
!                    vhdl-speedbar-entity-selected-face)))
            ((eq design-unit 'subprogram)
             (eq (get-text-property (match-end 0) 'face)
!                'vhdl-speedbar-subprogram-face))
            (t nil))))
  
  (defun vhdl-speedbar-set-depth (depth)
--- 14968,14978 ----
        (speedbar-position-cursor-on-line)
        (cond ((eq design-unit 'entity)
             (memq (get-text-property (match-end 0) 'face)
!                  '(vhdl-speedbar-entity
!                    vhdl-speedbar-entity-selected)))
            ((eq design-unit 'subprogram)
             (eq (get-text-property (match-end 0) 'face)
!                'vhdl-speedbar-subprogram))
            (t nil))))
  
  (defun vhdl-speedbar-set-depth (depth)
***************
*** 14979,15060 ****
  
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;; Fontification
  
! (defface vhdl-speedbar-entity-face
    '((((class color) (background light)) (:foreground "ForestGreen"))
      (((class color) (background dark)) (:foreground "PaleGreen")))
    "Face used for displaying entity names."
    :group 'speedbar-faces)
  
! (defface vhdl-speedbar-architecture-face
    '((((min-colors 88) (class color) (background light)) (:foreground "Blue1"))
      (((class color) (background light)) (:foreground "Blue"))
      (((class color) (background dark)) (:foreground "LightSkyBlue")))
    "Face used for displaying architecture names."
    :group 'speedbar-faces)
  
! (defface vhdl-speedbar-configuration-face
    '((((class color) (background light)) (:foreground "DarkGoldenrod"))
      (((class color) (background dark)) (:foreground "Salmon")))
    "Face used for displaying configuration names."
    :group 'speedbar-faces)
  
! (defface vhdl-speedbar-package-face
    '((((class color) (background light)) (:foreground "Grey50"))
      (((class color) (background dark)) (:foreground "Grey80")))
    "Face used for displaying package names."
    :group 'speedbar-faces)
  
! (defface vhdl-speedbar-library-face
    '((((class color) (background light)) (:foreground "Purple"))
      (((class color) (background dark)) (:foreground "Orchid1")))
    "Face used for displaying library names."
    :group 'speedbar-faces)
  
! (defface vhdl-speedbar-instantiation-face
    '((((class color) (background light)) (:foreground "Brown"))
      (((min-colors 88) (class color) (background dark)) (:foreground 
"Yellow1"))
      (((class color) (background dark)) (:foreground "Yellow")))
    "Face used for displaying instantiation names."
    :group 'speedbar-faces)
  
! (defface vhdl-speedbar-subprogram-face
    '((((class color) (background light)) (:foreground "Orchid4"))
      (((class color) (background dark)) (:foreground "BurlyWood2")))
    "Face used for displaying subprogram names."
    :group 'speedbar-faces)
  
! (defface vhdl-speedbar-entity-selected-face
    '((((class color) (background light)) (:foreground "ForestGreen" :underline 
t))
      (((class color) (background dark)) (:foreground "PaleGreen" :underline 
t)))
    "Face used for displaying entity names."
    :group 'speedbar-faces)
  
! (defface vhdl-speedbar-architecture-selected-face
    '((((min-colors 88) (class color) (background light)) (:foreground "Blue1" 
:underline t))
      (((min-colors 88) (class color) (background light)) (: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)
  
! (defface vhdl-speedbar-configuration-selected-face
    '((((class color) (background light)) (:foreground "DarkGoldenrod" 
:underline t))
      (((class color) (background dark)) (:foreground "Salmon" :underline t)))
    "Face used for displaying configuration names."
    :group 'speedbar-faces)
  
! (defface vhdl-speedbar-package-selected-face
    '((((class color) (background light)) (:foreground "Grey50" :underline t))
      (((class color) (background dark)) (:foreground "Grey80" :underline t)))
    "Face used for displaying package names."
    :group 'speedbar-faces)
  
! (defface vhdl-speedbar-instantiation-selected-face
    '((((class color) (background light)) (:foreground "Brown" :underline t))
      (((min-colors 88) (class color) (background dark)) (:foreground "Yellow1" 
:underline t))
      (((class color) (background dark)) (:foreground "Yellow" :underline t)))
    "Face used for displaying instantiation names."
    :group 'speedbar-faces)
  
  
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;; Initialization
--- 14983,15088 ----
  
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;; Fontification
  
! (defface vhdl-speedbar-entity
    '((((class color) (background light)) (:foreground "ForestGreen"))
      (((class color) (background dark)) (:foreground "PaleGreen")))
    "Face used for displaying entity names."
    :group 'speedbar-faces)
+ ;; backward-compatibility alias
+ (put 'vhdl-speedbar-entity-face 'face-alias 'vhdl-speedbar-entity)
  
! (defface vhdl-speedbar-architecture
    '((((min-colors 88) (class color) (background light)) (:foreground "Blue1"))
      (((class color) (background light)) (:foreground "Blue"))
      (((class color) (background dark)) (:foreground "LightSkyBlue")))
    "Face used for displaying architecture names."
    :group 'speedbar-faces)
+ ;; backward-compatibility alias
+ (put 'vhdl-speedbar-architecture-face 'face-alias 'vhdl-speedbar-architecture)
  
! (defface vhdl-speedbar-configuration
    '((((class color) (background light)) (:foreground "DarkGoldenrod"))
      (((class color) (background dark)) (:foreground "Salmon")))
    "Face used for displaying configuration names."
    :group 'speedbar-faces)
+ ;; backward-compatibility alias
+ (put 'vhdl-speedbar-configuration-face 'face-alias 
'vhdl-speedbar-configuration)
  
! (defface vhdl-speedbar-package
    '((((class color) (background light)) (:foreground "Grey50"))
      (((class color) (background dark)) (:foreground "Grey80")))
    "Face used for displaying package names."
    :group 'speedbar-faces)
+ ;; backward-compatibility alias
+ (put 'vhdl-speedbar-package-face 'face-alias 'vhdl-speedbar-package)
  
! (defface vhdl-speedbar-library
    '((((class color) (background light)) (:foreground "Purple"))
      (((class color) (background dark)) (:foreground "Orchid1")))
    "Face used for displaying library names."
    :group 'speedbar-faces)
+ ;; backward-compatibility alias
+ (put 'vhdl-speedbar-library-face 'face-alias 'vhdl-speedbar-library)
  
! (defface vhdl-speedbar-instantiation
    '((((class color) (background light)) (:foreground "Brown"))
      (((min-colors 88) (class color) (background dark)) (:foreground 
"Yellow1"))
      (((class color) (background dark)) (:foreground "Yellow")))
    "Face used for displaying instantiation names."
    :group 'speedbar-faces)
+ ;; backward-compatibility alias
+ (put 'vhdl-speedbar-instantiation-face 'face-alias 
'vhdl-speedbar-instantiation)
  
! (defface vhdl-speedbar-subprogram
    '((((class color) (background light)) (:foreground "Orchid4"))
      (((class color) (background dark)) (:foreground "BurlyWood2")))
    "Face used for displaying subprogram names."
    :group 'speedbar-faces)
+ ;; backward-compatibility alias
+ (put 'vhdl-speedbar-subprogram-face 'face-alias 'vhdl-speedbar-subprogram)
  
! (defface vhdl-speedbar-entity-selected
    '((((class color) (background light)) (:foreground "ForestGreen" :underline 
t))
      (((class color) (background dark)) (:foreground "PaleGreen" :underline 
t)))
    "Face used for displaying entity names."
    :group 'speedbar-faces)
+ ;; backward-compatibility alias
+ (put 'vhdl-speedbar-entity-selected-face 'face-alias 
'vhdl-speedbar-entity-selected)
  
! (defface vhdl-speedbar-architecture-selected
    '((((min-colors 88) (class color) (background light)) (:foreground "Blue1" 
:underline t))
      (((min-colors 88) (class color) (background light)) (: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)
+ ;; backward-compatibility alias
+ (put 'vhdl-speedbar-architecture-selected-face 'face-alias 
'vhdl-speedbar-architecture-selected)
  
! (defface vhdl-speedbar-configuration-selected
    '((((class color) (background light)) (:foreground "DarkGoldenrod" 
:underline t))
      (((class color) (background dark)) (:foreground "Salmon" :underline t)))
    "Face used for displaying configuration names."
    :group 'speedbar-faces)
+ ;; backward-compatibility alias
+ (put 'vhdl-speedbar-configuration-selected-face 'face-alias 
'vhdl-speedbar-configuration-selected)
  
! (defface vhdl-speedbar-package-selected
    '((((class color) (background light)) (:foreground "Grey50" :underline t))
      (((class color) (background dark)) (:foreground "Grey80" :underline t)))
    "Face used for displaying package names."
    :group 'speedbar-faces)
+ ;; backward-compatibility alias
+ (put 'vhdl-speedbar-package-selected-face 'face-alias 
'vhdl-speedbar-package-selected)
  
! (defface vhdl-speedbar-instantiation-selected
    '((((class color) (background light)) (:foreground "Brown" :underline t))
      (((min-colors 88) (class color) (background dark)) (:foreground "Yellow1" 
:underline t))
      (((class color) (background dark)) (:foreground "Yellow" :underline t)))
    "Face used for displaying instantiation names."
    :group 'speedbar-faces)
+ ;; backward-compatibility alias
+ (put 'vhdl-speedbar-instantiation-selected-face 'face-alias 
'vhdl-speedbar-instantiation-selected)
  
  
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;; Initialization




reply via email to

[Prev in Thread] Current Thread [Next in Thread]