comparison lisp/progmodes/vhdl-mode.el @ 90143:146c086df160

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-37 Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 241-257) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 59-65) - Update from CVS - Merge from emacs--cvs-trunk--0 - (mm-string-to-multibyte): Use Gnus trunk definition.
author Miles Bader <miles@gnu.org>
date Thu, 14 Apr 2005 05:03:52 +0000
parents 02f1dbc4a199 bf74e258742e
children f042e7c0fe20
comparison
equal deleted inserted replaced
90142:627771f44771 90143:146c086df160
2037 (defvar vhdl-warnings nil 2037 (defvar vhdl-warnings nil
2038 "Warnings to tell the user during start up.") 2038 "Warnings to tell the user during start up.")
2039 2039
2040 (defun vhdl-run-when-idle (secs repeat function) 2040 (defun vhdl-run-when-idle (secs repeat function)
2041 "Wait until idle, then run FUNCTION." 2041 "Wait until idle, then run FUNCTION."
2042 (if vhdl-xemacs 2042 (if (fboundp 'start-itimer)
2043 (start-itimer "vhdl-mode" function secs repeat t) 2043 (start-itimer "vhdl-mode" function secs repeat t)
2044 ; (run-with-idle-timer secs repeat function))) 2044 ; (run-with-idle-timer secs repeat function)))
2045 ;; explicitely activate timer (necessary when Emacs is already idle) 2045 ;; explicitely activate timer (necessary when Emacs is already idle)
2046 (aset (run-with-idle-timer secs repeat function) 0 nil))) 2046 (aset (run-with-idle-timer secs repeat function) 0 nil)))
2047 2047
2677 (define-key vhdl-mode-map "\C-c\C-i\C-m" 'vhdl-model-insert) 2677 (define-key vhdl-mode-map "\C-c\C-i\C-m" 'vhdl-model-insert)
2678 ;; electric key bindings 2678 ;; electric key bindings
2679 (define-key vhdl-mode-map " " 'vhdl-electric-space) 2679 (define-key vhdl-mode-map " " 'vhdl-electric-space)
2680 (if vhdl-intelligent-tab 2680 (if vhdl-intelligent-tab
2681 (define-key vhdl-mode-map "\t" 'vhdl-electric-tab) 2681 (define-key vhdl-mode-map "\t" 'vhdl-electric-tab)
2682 (define-key vhdl-mode-map "\t" 'indent-according-to-mode)) 2682 ;; The default binding of TAB already calls `indent-according-to-mode'.
2683 ;; (define-key vhdl-mode-map "\t" 'indent-according-to-mode)
2684 )
2683 (define-key vhdl-mode-map "\r" 'vhdl-electric-return) 2685 (define-key vhdl-mode-map "\r" 'vhdl-electric-return)
2684 (define-key vhdl-mode-map "-" 'vhdl-electric-dash) 2686 (define-key vhdl-mode-map "-" 'vhdl-electric-dash)
2685 (define-key vhdl-mode-map "[" 'vhdl-electric-open-bracket) 2687 (define-key vhdl-mode-map "[" 'vhdl-electric-open-bracket)
2686 (define-key vhdl-mode-map "]" 'vhdl-electric-close-bracket) 2688 (define-key vhdl-mode-map "]" 'vhdl-electric-close-bracket)
2687 (define-key vhdl-mode-map "'" 'vhdl-electric-quote) 2689 (define-key vhdl-mode-map "'" 'vhdl-electric-quote)
2694 ;; initialize mode map for VHDL Mode 2696 ;; initialize mode map for VHDL Mode
2695 (vhdl-mode-map-init) 2697 (vhdl-mode-map-init)
2696 2698
2697 ;; define special minibuffer keymap for enabling word completion in minibuffer 2699 ;; define special minibuffer keymap for enabling word completion in minibuffer
2698 ;; (useful in template generator prompts) 2700 ;; (useful in template generator prompts)
2699 (defvar vhdl-minibuffer-local-map (copy-keymap minibuffer-local-map) 2701 (defvar vhdl-minibuffer-local-map
2702 (let ((map (make-sparse-keymap)))
2703 (set-keymap-parent map minibuffer-local-map)
2704 (when vhdl-word-completion-in-minibuffer
2705 (define-key map "\t" 'vhdl-minibuffer-tab))
2706 map)
2700 "Keymap for minibuffer used in VHDL Mode.") 2707 "Keymap for minibuffer used in VHDL Mode.")
2701
2702 (when vhdl-word-completion-in-minibuffer
2703 (define-key vhdl-minibuffer-local-map "\t" 'vhdl-minibuffer-tab))
2704 2708
2705 ;; set up electric character functions to work with 2709 ;; set up electric character functions to work with
2706 ;; `delete-selection-mode' (Emacs) and `pending-delete-mode' (XEmacs) 2710 ;; `delete-selection-mode' (Emacs) and `pending-delete-mode' (XEmacs)
2707 (mapcar 2711 (mapcar
2708 (function 2712 (function
2790 (define-abbrev-table 'vhdl-mode-abbrev-table 2794 (define-abbrev-table 'vhdl-mode-abbrev-table
2791 (append 2795 (append
2792 (when (memq 'vhdl vhdl-electric-keywords) 2796 (when (memq 'vhdl vhdl-electric-keywords)
2793 ;; VHDL'93 keywords 2797 ;; VHDL'93 keywords
2794 '( 2798 '(
2795 ("--" "" vhdl-template-display-comment-hook 0) 2799 ("--" "" vhdl-template-display-comment-hook 0 t)
2796 ("abs" "" vhdl-template-default-hook 0) 2800 ("abs" "" vhdl-template-default-hook 0 t)
2797 ("access" "" vhdl-template-default-hook 0) 2801 ("access" "" vhdl-template-default-hook 0 t)
2798 ("after" "" vhdl-template-default-hook 0) 2802 ("after" "" vhdl-template-default-hook 0 t)
2799 ("alias" "" vhdl-template-alias-hook 0) 2803 ("alias" "" vhdl-template-alias-hook 0 t)
2800 ("all" "" vhdl-template-default-hook 0) 2804 ("all" "" vhdl-template-default-hook 0 t)
2801 ("and" "" vhdl-template-default-hook 0) 2805 ("and" "" vhdl-template-default-hook 0 t)
2802 ("arch" "" vhdl-template-architecture-hook 0) 2806 ("arch" "" vhdl-template-architecture-hook 0 t)
2803 ("architecture" "" vhdl-template-architecture-hook 0) 2807 ("architecture" "" vhdl-template-architecture-hook 0 t)
2804 ("array" "" vhdl-template-default-hook 0) 2808 ("array" "" vhdl-template-default-hook 0 t)
2805 ("assert" "" vhdl-template-assert-hook 0) 2809 ("assert" "" vhdl-template-assert-hook 0 t)
2806 ("attr" "" vhdl-template-attribute-hook 0) 2810 ("attr" "" vhdl-template-attribute-hook 0 t)
2807 ("attribute" "" vhdl-template-attribute-hook 0) 2811 ("attribute" "" vhdl-template-attribute-hook 0 t)
2808 ("begin" "" vhdl-template-default-indent-hook 0) 2812 ("begin" "" vhdl-template-default-indent-hook 0 t)
2809 ("block" "" vhdl-template-block-hook 0) 2813 ("block" "" vhdl-template-block-hook 0 t)
2810 ("body" "" vhdl-template-default-hook 0) 2814 ("body" "" vhdl-template-default-hook 0 t)
2811 ("buffer" "" vhdl-template-default-hook 0) 2815 ("buffer" "" vhdl-template-default-hook 0 t)
2812 ("bus" "" vhdl-template-default-hook 0) 2816 ("bus" "" vhdl-template-default-hook 0 t)
2813 ("case" "" vhdl-template-case-hook 0) 2817 ("case" "" vhdl-template-case-hook 0 t)
2814 ("comp" "" vhdl-template-component-hook 0) 2818 ("comp" "" vhdl-template-component-hook 0 t)
2815 ("component" "" vhdl-template-component-hook 0) 2819 ("component" "" vhdl-template-component-hook 0 t)
2816 ("cond" "" vhdl-template-conditional-signal-asst-hook 0) 2820 ("cond" "" vhdl-template-conditional-signal-asst-hook 0 t)
2817 ("conditional" "" vhdl-template-conditional-signal-asst-hook 0) 2821 ("conditional" "" vhdl-template-conditional-signal-asst-hook 0 t)
2818 ("conf" "" vhdl-template-configuration-hook 0) 2822 ("conf" "" vhdl-template-configuration-hook 0 t)
2819 ("configuration" "" vhdl-template-configuration-hook 0) 2823 ("configuration" "" vhdl-template-configuration-hook 0 t)
2820 ("cons" "" vhdl-template-constant-hook 0) 2824 ("cons" "" vhdl-template-constant-hook 0 t)
2821 ("constant" "" vhdl-template-constant-hook 0) 2825 ("constant" "" vhdl-template-constant-hook 0 t)
2822 ("disconnect" "" vhdl-template-disconnect-hook 0) 2826 ("disconnect" "" vhdl-template-disconnect-hook 0 t)
2823 ("downto" "" vhdl-template-default-hook 0) 2827 ("downto" "" vhdl-template-default-hook 0 t)
2824 ("else" "" vhdl-template-else-hook 0) 2828 ("else" "" vhdl-template-else-hook 0 t)
2825 ("elseif" "" vhdl-template-elsif-hook 0) 2829 ("elseif" "" vhdl-template-elsif-hook 0 t)
2826 ("elsif" "" vhdl-template-elsif-hook 0) 2830 ("elsif" "" vhdl-template-elsif-hook 0 t)
2827 ("end" "" vhdl-template-default-indent-hook 0) 2831 ("end" "" vhdl-template-default-indent-hook 0 t)
2828 ("entity" "" vhdl-template-entity-hook 0) 2832 ("entity" "" vhdl-template-entity-hook 0 t)
2829 ("exit" "" vhdl-template-exit-hook 0) 2833 ("exit" "" vhdl-template-exit-hook 0 t)
2830 ("file" "" vhdl-template-file-hook 0) 2834 ("file" "" vhdl-template-file-hook 0 t)
2831 ("for" "" vhdl-template-for-hook 0) 2835 ("for" "" vhdl-template-for-hook 0 t)
2832 ("func" "" vhdl-template-function-hook 0) 2836 ("func" "" vhdl-template-function-hook 0 t)
2833 ("function" "" vhdl-template-function-hook 0) 2837 ("function" "" vhdl-template-function-hook 0 t)
2834 ("generic" "" vhdl-template-generic-hook 0) 2838 ("generic" "" vhdl-template-generic-hook 0 t)
2835 ("group" "" vhdl-template-group-hook 0) 2839 ("group" "" vhdl-template-group-hook 0 t)
2836 ("guarded" "" vhdl-template-default-hook 0) 2840 ("guarded" "" vhdl-template-default-hook 0 t)
2837 ("if" "" vhdl-template-if-hook 0) 2841 ("if" "" vhdl-template-if-hook 0 t)
2838 ("impure" "" vhdl-template-default-hook 0) 2842 ("impure" "" vhdl-template-default-hook 0 t)
2839 ("in" "" vhdl-template-default-hook 0) 2843 ("in" "" vhdl-template-default-hook 0 t)
2840 ("inertial" "" vhdl-template-default-hook 0) 2844 ("inertial" "" vhdl-template-default-hook 0 t)
2841 ("inout" "" vhdl-template-default-hook 0) 2845 ("inout" "" vhdl-template-default-hook 0 t)
2842 ("inst" "" vhdl-template-instance-hook 0) 2846 ("inst" "" vhdl-template-instance-hook 0 t)
2843 ("instance" "" vhdl-template-instance-hook 0) 2847 ("instance" "" vhdl-template-instance-hook 0 t)
2844 ("is" "" vhdl-template-default-hook 0) 2848 ("is" "" vhdl-template-default-hook 0 t)
2845 ("label" "" vhdl-template-default-hook 0) 2849 ("label" "" vhdl-template-default-hook 0 t)
2846 ("library" "" vhdl-template-library-hook 0) 2850 ("library" "" vhdl-template-library-hook 0 t)
2847 ("linkage" "" vhdl-template-default-hook 0) 2851 ("linkage" "" vhdl-template-default-hook 0 t)
2848 ("literal" "" vhdl-template-default-hook 0) 2852 ("literal" "" vhdl-template-default-hook 0 t)
2849 ("loop" "" vhdl-template-bare-loop-hook 0) 2853 ("loop" "" vhdl-template-bare-loop-hook 0 t)
2850 ("map" "" vhdl-template-map-hook 0) 2854 ("map" "" vhdl-template-map-hook 0 t)
2851 ("mod" "" vhdl-template-default-hook 0) 2855 ("mod" "" vhdl-template-default-hook 0 t)
2852 ("nand" "" vhdl-template-default-hook 0) 2856 ("nand" "" vhdl-template-default-hook 0 t)
2853 ("new" "" vhdl-template-default-hook 0) 2857 ("new" "" vhdl-template-default-hook 0 t)
2854 ("next" "" vhdl-template-next-hook 0) 2858 ("next" "" vhdl-template-next-hook 0 t)
2855 ("nor" "" vhdl-template-default-hook 0) 2859 ("nor" "" vhdl-template-default-hook 0 t)
2856 ("not" "" vhdl-template-default-hook 0) 2860 ("not" "" vhdl-template-default-hook 0 t)
2857 ("null" "" vhdl-template-default-hook 0) 2861 ("null" "" vhdl-template-default-hook 0 t)
2858 ("of" "" vhdl-template-default-hook 0) 2862 ("of" "" vhdl-template-default-hook 0 t)
2859 ("on" "" vhdl-template-default-hook 0) 2863 ("on" "" vhdl-template-default-hook 0 t)
2860 ("open" "" vhdl-template-default-hook 0) 2864 ("open" "" vhdl-template-default-hook 0 t)
2861 ("or" "" vhdl-template-default-hook 0) 2865 ("or" "" vhdl-template-default-hook 0 t)
2862 ("others" "" vhdl-template-others-hook 0) 2866 ("others" "" vhdl-template-others-hook 0 t)
2863 ("out" "" vhdl-template-default-hook 0) 2867 ("out" "" vhdl-template-default-hook 0 t)
2864 ("pack" "" vhdl-template-package-hook 0) 2868 ("pack" "" vhdl-template-package-hook 0 t)
2865 ("package" "" vhdl-template-package-hook 0) 2869 ("package" "" vhdl-template-package-hook 0 t)
2866 ("port" "" vhdl-template-port-hook 0) 2870 ("port" "" vhdl-template-port-hook 0 t)
2867 ("postponed" "" vhdl-template-default-hook 0) 2871 ("postponed" "" vhdl-template-default-hook 0 t)
2868 ("procedure" "" vhdl-template-procedure-hook 0) 2872 ("procedure" "" vhdl-template-procedure-hook 0 t)
2869 ("process" "" vhdl-template-process-hook 0) 2873 ("process" "" vhdl-template-process-hook 0 t)
2870 ("pure" "" vhdl-template-default-hook 0) 2874 ("pure" "" vhdl-template-default-hook 0 t)
2871 ("range" "" vhdl-template-default-hook 0) 2875 ("range" "" vhdl-template-default-hook 0 t)
2872 ("record" "" vhdl-template-default-hook 0) 2876 ("record" "" vhdl-template-default-hook 0 t)
2873 ("register" "" vhdl-template-default-hook 0) 2877 ("register" "" vhdl-template-default-hook 0 t)
2874 ("reject" "" vhdl-template-default-hook 0) 2878 ("reject" "" vhdl-template-default-hook 0 t)
2875 ("rem" "" vhdl-template-default-hook 0) 2879 ("rem" "" vhdl-template-default-hook 0 t)
2876 ("report" "" vhdl-template-report-hook 0) 2880 ("report" "" vhdl-template-report-hook 0 t)
2877 ("return" "" vhdl-template-return-hook 0) 2881 ("return" "" vhdl-template-return-hook 0 t)
2878 ("rol" "" vhdl-template-default-hook 0) 2882 ("rol" "" vhdl-template-default-hook 0 t)
2879 ("ror" "" vhdl-template-default-hook 0) 2883 ("ror" "" vhdl-template-default-hook 0 t)
2880 ("select" "" vhdl-template-selected-signal-asst-hook 0) 2884 ("select" "" vhdl-template-selected-signal-asst-hook 0 t)
2881 ("severity" "" vhdl-template-default-hook 0) 2885 ("severity" "" vhdl-template-default-hook 0 t)
2882 ("shared" "" vhdl-template-default-hook 0) 2886 ("shared" "" vhdl-template-default-hook 0 t)
2883 ("sig" "" vhdl-template-signal-hook 0) 2887 ("sig" "" vhdl-template-signal-hook 0 t)
2884 ("signal" "" vhdl-template-signal-hook 0) 2888 ("signal" "" vhdl-template-signal-hook 0 t)
2885 ("sla" "" vhdl-template-default-hook 0) 2889 ("sla" "" vhdl-template-default-hook 0 t)
2886 ("sll" "" vhdl-template-default-hook 0) 2890 ("sll" "" vhdl-template-default-hook 0 t)
2887 ("sra" "" vhdl-template-default-hook 0) 2891 ("sra" "" vhdl-template-default-hook 0 t)
2888 ("srl" "" vhdl-template-default-hook 0) 2892 ("srl" "" vhdl-template-default-hook 0 t)
2889 ("subtype" "" vhdl-template-subtype-hook 0) 2893 ("subtype" "" vhdl-template-subtype-hook 0 t)
2890 ("then" "" vhdl-template-default-hook 0) 2894 ("then" "" vhdl-template-default-hook 0 t)
2891 ("to" "" vhdl-template-default-hook 0) 2895 ("to" "" vhdl-template-default-hook 0 t)
2892 ("transport" "" vhdl-template-default-hook 0) 2896 ("transport" "" vhdl-template-default-hook 0 t)
2893 ("type" "" vhdl-template-type-hook 0) 2897 ("type" "" vhdl-template-type-hook 0 t)
2894 ("unaffected" "" vhdl-template-default-hook 0) 2898 ("unaffected" "" vhdl-template-default-hook 0 t)
2895 ("units" "" vhdl-template-default-hook 0) 2899 ("units" "" vhdl-template-default-hook 0 t)
2896 ("until" "" vhdl-template-default-hook 0) 2900 ("until" "" vhdl-template-default-hook 0 t)
2897 ("use" "" vhdl-template-use-hook 0) 2901 ("use" "" vhdl-template-use-hook 0 t)
2898 ("var" "" vhdl-template-variable-hook 0) 2902 ("var" "" vhdl-template-variable-hook 0 t)
2899 ("variable" "" vhdl-template-variable-hook 0) 2903 ("variable" "" vhdl-template-variable-hook 0 t)
2900 ("wait" "" vhdl-template-wait-hook 0) 2904 ("wait" "" vhdl-template-wait-hook 0 t)
2901 ("when" "" vhdl-template-when-hook 0) 2905 ("when" "" vhdl-template-when-hook 0 t)
2902 ("while" "" vhdl-template-while-loop-hook 0) 2906 ("while" "" vhdl-template-while-loop-hook 0 t)
2903 ("with" "" vhdl-template-with-hook 0) 2907 ("with" "" vhdl-template-with-hook 0 t)
2904 ("xnor" "" vhdl-template-default-hook 0) 2908 ("xnor" "" vhdl-template-default-hook 0 t)
2905 ("xor" "" vhdl-template-default-hook 0) 2909 ("xor" "" vhdl-template-default-hook 0 t)
2906 )) 2910 ))
2907 ;; VHDL-AMS keywords 2911 ;; VHDL-AMS keywords
2908 (when (and (memq 'vhdl vhdl-electric-keywords) (vhdl-standard-p 'ams)) 2912 (when (and (memq 'vhdl vhdl-electric-keywords) (vhdl-standard-p 'ams))
2909 '( 2913 '(
2910 ("across" "" vhdl-template-default-hook 0) 2914 ("across" "" vhdl-template-default-hook 0 t)
2911 ("break" "" vhdl-template-break-hook 0) 2915 ("break" "" vhdl-template-break-hook 0 t)
2912 ("limit" "" vhdl-template-limit-hook 0) 2916 ("limit" "" vhdl-template-limit-hook 0 t)
2913 ("nature" "" vhdl-template-nature-hook 0) 2917 ("nature" "" vhdl-template-nature-hook 0 t)
2914 ("noise" "" vhdl-template-default-hook 0) 2918 ("noise" "" vhdl-template-default-hook 0 t)
2915 ("procedural" "" vhdl-template-procedural-hook 0) 2919 ("procedural" "" vhdl-template-procedural-hook 0 t)
2916 ("quantity" "" vhdl-template-quantity-hook 0) 2920 ("quantity" "" vhdl-template-quantity-hook 0 t)
2917 ("reference" "" vhdl-template-default-hook 0) 2921 ("reference" "" vhdl-template-default-hook 0 t)
2918 ("spectrum" "" vhdl-template-default-hook 0) 2922 ("spectrum" "" vhdl-template-default-hook 0 t)
2919 ("subnature" "" vhdl-template-subnature-hook 0) 2923 ("subnature" "" vhdl-template-subnature-hook 0 t)
2920 ("terminal" "" vhdl-template-terminal-hook 0) 2924 ("terminal" "" vhdl-template-terminal-hook 0 t)
2921 ("through" "" vhdl-template-default-hook 0) 2925 ("through" "" vhdl-template-default-hook 0 t)
2922 ("tolerance" "" vhdl-template-default-hook 0) 2926 ("tolerance" "" vhdl-template-default-hook 0 t)
2923 )) 2927 ))
2924 ;; user model keywords 2928 ;; user model keywords
2925 (when (memq 'user vhdl-electric-keywords) 2929 (when (memq 'user vhdl-electric-keywords)
2926 (let ((alist vhdl-model-alist) 2930 (let ((alist vhdl-model-alist)
2927 abbrev-list keyword) 2931 abbrev-list keyword)
2929 (setq keyword (nth 3 (car alist))) 2933 (setq keyword (nth 3 (car alist)))
2930 (unless (equal keyword "") 2934 (unless (equal keyword "")
2931 (setq abbrev-list 2935 (setq abbrev-list
2932 (cons (list keyword "" 2936 (cons (list keyword ""
2933 (vhdl-function-name 2937 (vhdl-function-name
2934 "vhdl-model" (nth 0 (car alist)) "hook") 0) 2938 "vhdl-model" (nth 0 (car alist)) "hook") 0 t)
2935 abbrev-list))) 2939 abbrev-list)))
2936 (setq alist (cdr alist))) 2940 (setq alist (cdr alist)))
2937 abbrev-list))))) 2941 abbrev-list)))))
2938 2942
2939 ;; initialize abbrev table for VHDL Mode 2943 ;; initialize abbrev table for VHDL Mode
3744 "--" 3748 "--"
3745 ["Customize Group..." (customize-group 'vhdl-align) t]) 3749 ["Customize Group..." (customize-group 'vhdl-align) t])
3746 ("Highlight" 3750 ("Highlight"
3747 ["Highlighting On/Off..." 3751 ["Highlighting On/Off..."
3748 (customize-option 3752 (customize-option
3749 (if vhdl-xemacs 'font-lock-auto-fontify 'global-font-lock-mode)) t] 3753 (if (fboundp 'global-font-lock-mode)
3754 'global-font-lock-mode 'font-lock-auto-fontify)) t]
3750 ["Highlight Keywords" 3755 ["Highlight Keywords"
3751 (progn (customize-set-variable 'vhdl-highlight-keywords 3756 (progn (customize-set-variable 'vhdl-highlight-keywords
3752 (not vhdl-highlight-keywords)) 3757 (not vhdl-highlight-keywords))
3753 (vhdl-fontify-buffer)) 3758 (vhdl-fontify-buffer))
3754 :style toggle :selected vhdl-highlight-keywords] 3759 :style toggle :selected vhdl-highlight-keywords]
7852 Used for undoing after template abortion.") 7857 Used for undoing after template abortion.")
7853 7858
7854 ;; correct different behavior of function `unread-command-events' in XEmacs 7859 ;; correct different behavior of function `unread-command-events' in XEmacs
7855 (defun vhdl-character-to-event (arg)) 7860 (defun vhdl-character-to-event (arg))
7856 (defalias 'vhdl-character-to-event 7861 (defalias 'vhdl-character-to-event
7857 (if vhdl-xemacs 'character-to-event 'identity)) 7862 (if (fboundp 'character-to-event) 'character-to-event 'identity))
7858 7863
7859 (defun vhdl-work-library () 7864 (defun vhdl-work-library ()
7860 "Return the working library name of the current project or \"work\" if no 7865 "Return the working library name of the current project or \"work\" if no
7861 project is defined." 7866 project is defined."
7862 (vhdl-resolve-env-variable 7867 (vhdl-resolve-env-variable
10397 (let ((caught (catch 'abort 10402 (let ((caught (catch 'abort
10398 (funcall func)))) 10403 (funcall func))))
10399 (when (stringp caught) (message caught))) 10404 (when (stringp caught) (message caught)))
10400 (when (= invoke-char ?-) (setq abbrev-start-location (point))) 10405 (when (= invoke-char ?-) (setq abbrev-start-location (point)))
10401 ;; delete CR which is still in event queue 10406 ;; delete CR which is still in event queue
10402 (if vhdl-xemacs 10407 (if (fboundp 'enqueue-eval-event)
10403 (enqueue-eval-event 'delete-char -1) 10408 (enqueue-eval-event 'delete-char -1)
10404 (setq unread-command-events ; push back a delete char 10409 (setq unread-command-events ; push back a delete char
10405 (list (vhdl-character-to-event ?\177)))))))) 10410 (list (vhdl-character-to-event ?\177))))))))
10406 10411
10407 (defun vhdl-template-alias-hook () 10412 (defun vhdl-template-alias-hook ()
11921 11926
11922 (defun vhdl-current-line () 11927 (defun vhdl-current-line ()
11923 "Return the line number of the line containing point." 11928 "Return the line number of the line containing point."
11924 (save-restriction 11929 (save-restriction
11925 (widen) 11930 (widen)
11926 (save-excursion 11931 (1+ (count-lines (point-min) (line-beginning-position)))))
11927 (beginning-of-line)
11928 (1+ (count-lines 1 (point))))))
11929 11932
11930 (defun vhdl-line-kill-entire (&optional arg) 11933 (defun vhdl-line-kill-entire (&optional arg)
11931 "Delete entire line." 11934 "Delete entire line."
11932 (interactive "p") 11935 (interactive "p")
11933 (beginning-of-line) 11936 (beginning-of-line)
16557 (vhdl-keep-region-active)) 16560 (vhdl-keep-region-active))
16558 16561
16559 (defun vhdl-doc-variable (variable) 16562 (defun vhdl-doc-variable (variable)
16560 "Display VARIABLE's documentation in *Help* buffer." 16563 "Display VARIABLE's documentation in *Help* buffer."
16561 (interactive) 16564 (interactive)
16562 (with-output-to-temp-buffer "*Help*" 16565 (unless vhdl-xemacs
16566 (help-setup-xref (list #'vhdl-doc-variable variable) (interactive-p)))
16567 (with-output-to-temp-buffer (if (fboundp 'help-buffer) (help-buffer) "*Help*")
16563 (princ (documentation-property variable 'variable-documentation)) 16568 (princ (documentation-property variable 'variable-documentation))
16564 (unless vhdl-xemacs 16569 (with-current-buffer standard-output
16565 (help-setup-xref (list #'vhdl-doc-variable variable) (interactive-p)))
16566 (save-excursion
16567 (set-buffer standard-output)
16568 (help-mode)) 16570 (help-mode))
16569 (print-help-return-message))) 16571 (print-help-return-message)))
16570 16572
16571 (defun vhdl-doc-mode () 16573 (defun vhdl-doc-mode ()
16572 "Display VHDL Mode documentation in *Help* buffer." 16574 "Display VHDL Mode documentation in *Help* buffer."
16573 (interactive) 16575 (interactive)
16574 (with-output-to-temp-buffer "*Help*" 16576 (unless vhdl-xemacs
16577 (help-setup-xref (list #'vhdl-doc-mode) (interactive-p)))
16578 (with-output-to-temp-buffer (if (fboundp 'help-buffer) (help-buffer) "*Help*")
16575 (princ mode-name) 16579 (princ mode-name)
16576 (princ " mode:\n") 16580 (princ " mode:\n")
16577 (princ (documentation 'vhdl-mode)) 16581 (princ (documentation 'vhdl-mode))
16578 (unless vhdl-xemacs 16582 (with-current-buffer standard-output
16579 (help-setup-xref (list #'vhdl-doc-mode) (interactive-p)))
16580 (save-excursion
16581 (set-buffer standard-output)
16582 (help-mode)) 16583 (help-mode))
16583 (print-help-return-message))) 16584 (print-help-return-message)))
16584 16585
16585 16586
16586 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 16587 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
16587 16588
16588 (provide 'vhdl-mode) 16589 (provide 'vhdl-mode)
16589 16590
16590 ;;; arch-tag: 780d7073-9b5d-4c6c-b0d8-26b28783aba3 16591 ;; arch-tag: 780d7073-9b5d-4c6c-b0d8-26b28783aba3
16591 ;;; vhdl-mode.el ends here 16592 ;;; vhdl-mode.el ends here