------------------------------------------------------------ revno: 116895 committer: Glenn Morris branch nick: trunk timestamp: Fri 2014-03-28 00:16:42 -0700 message: Tweak earlier tty-run-terminal-initialization change * lisp/faces.el (tty-run-terminal-initialization): Use tty-find-type so that aliases are matched with the hyphen and underscore stripping behavior. diff: === modified file 'lisp/faces.el' --- lisp/faces.el 2014-03-28 01:39:30 +0000 +++ lisp/faces.el 2014-03-28 07:16:42 +0000 @@ -2142,8 +2142,9 @@ If you set `term-file-prefix' to nil, this function does nothing." (setq type (or type (tty-type frame))) - (let ((alias (assoc type term-file-aliases))) - (if alias (setq type (cdr alias)))) + (let ((alias (tty-find-type + (lambda (typ) (assoc typ term-file-aliases)) type))) + (if alias (setq type (cdr (assoc alias term-file-aliases))))) ;; Load library for our terminal type. ;; User init file can set term-file-prefix to nil to prevent this. (with-selected-frame frame ------------------------------------------------------------ revno: 116894 committer: Glenn Morris branch nick: trunk timestamp: Thu 2014-03-27 21:39:30 -0400 message: Make term-file-aliases into a defcustom; tweaks previous change diff: === modified file 'doc/lispref/os.texi' --- doc/lispref/os.texi 2014-03-28 01:29:54 +0000 +++ doc/lispref/os.texi 2014-03-28 01:39:30 +0000 @@ -465,7 +465,7 @@ You could use this hook to define initializations for terminals that do not have their own libraries. @xref{Hooks}. -@defvar term-file-prefix +@defopt term-file-prefix @cindex @env{TERM} environment variable If the value of this variable is non-@code{nil}, Emacs loads a terminal-specific initialization file as follows: @@ -480,14 +480,14 @@ terminal-initialization file. On MS-DOS, Emacs sets the @env{TERM} environment variable to @samp{internal}. -@end defvar +@end defopt -@defvar term-file-aliases +@defopt term-file-aliases This variable is an an association list mapping terminal types to their aliases. For example, an element of the form @code{("vt102" . "vt100")} means to treat a terminal of type @samp{vt102} like one of type @samp{vt100}. -@end defvar +@end defopt @defvar tty-setup-hook This variable is a normal hook that Emacs runs after initializing a === modified file 'lisp/faces.el' --- lisp/faces.el 2014-03-28 01:29:54 +0000 +++ lisp/faces.el 2014-03-28 01:39:30 +0000 @@ -35,6 +35,26 @@ (string :tag "Name of directory with term files")) :group 'terminals) +(defcustom term-file-aliases + '(("apollo" . "vt100") + ("vt102" . "vt100") + ("vt125" . "vt100") + ("vt201" . "vt200") + ("vt220" . "vt200") + ("vt240" . "vt200") + ("vt300" . "vt200") + ("vt320" . "vt200") + ("vt400" . "vt200") + ("vt420" . "vt200") + ) + "Alist of terminal type aliases. +Entries are of the form (TYPE . ALIAS), where both elements are strings. +This means to treat a terminal of type TYPE as if it were of type ALIAS." + :type '(alist :key-type (string :tag "Terminal") + :value-type (string :tag "Alias")) + :group 'terminals + :version "24.5") + (declare-function xw-defined-colors "term/common-win" (&optional frame)) (defvar help-xref-stack-item) @@ -2110,22 +2130,6 @@ Specifically, `tty-run-terminal-initialization' runs this. This can be used to fine tune the `input-decode-map', for example.") -(defvar term-file-aliases - '(("apollo" . "vt100") - ("vt102" . "vt100") - ("vt125" . "vt100") - ("vt201" . "vt200") - ("vt220" . "vt200") - ("vt240" . "vt200") - ("vt300" . "vt200") - ("vt320" . "vt200") - ("vt400" . "vt200") - ("vt420" . "vt200") - ) - "Alist of terminal type aliases. -Entries are of the form (TYPE . ALIAS), where both elements are strings. -This means to treat a terminal of type TYPE as if it were of type ALIAS.") - (defun tty-run-terminal-initialization (frame &optional type run-hook) "Run the special initialization code for the terminal type of FRAME. The optional TYPE parameter may be used to override the autodetected ------------------------------------------------------------ revno: 116893 committer: Glenn Morris branch nick: trunk timestamp: Thu 2014-03-27 21:29:54 -0400 message: Introduce `term-file-aliases', replacing some small lisp/term files * lisp/faces.el (term-file-aliases): New variable. (tty-run-terminal-initialization): Respect term-file-aliases. * lisp/term/apollo.el, lisp/term/vt102.el, lisp/term/vt125.el: * lisp/term/vt201.el, lisp/term/vt220.el, lisp/term/vt240.el: * lisp/term/vt300.el, lisp/term/vt320.el, lisp/term/vt400.el: * lisp/term/vt420.el: Remove files, replaced by aliases. * lisp/term/README: Mention term-file-aliases. * lisp/term/AT386.el, lisp/term/news.el, lisp/term/tvi970.el: * lisp/term/vt100.el, lisp/term/wyse50.el: Remove obsolete comment. * doc/emacs/custom.texi (Terminal Init): Mention term-file-aliases. * doc/lispref/os.texi (Terminal-Specific): Mention term-file-aliases. * etc/NEWS: Mention this. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2014-03-26 01:41:13 +0000 +++ doc/emacs/ChangeLog 2014-03-28 01:29:54 +0000 @@ -1,3 +1,7 @@ +2014-03-28 Glenn Morris + + * custom.texi (Terminal Init): Mention term-file-aliases. + 2014-03-26 Glenn Morris * ack.texi (Acknowledgments): Remove reference to obsolete file. === modified file 'doc/emacs/custom.texi' --- doc/emacs/custom.texi 2014-02-28 05:30:28 +0000 +++ doc/emacs/custom.texi 2014-03-28 01:29:54 +0000 @@ -2445,9 +2445,13 @@ @node Terminal Init @subsection Terminal-specific Initialization +@vindex term-file-aliases Each terminal type can have a Lisp library to be loaded into Emacs when it is run on that type of terminal. For a terminal type named -@var{termtype}, the library is called @file{term/@var{termtype}} and it is +@var{termtype}, the library is called @file{term/@var{termtype}}. +(If there is an entry of the form @code{(@var{termtype} . @var{alias})} +in the @code{term-file-aliases} association list, Emacs uses +@var{alias} in place of @var{termtype}.) The library is found by searching the directories @code{load-path} as usual and trying the suffixes @samp{.elc} and @samp{.el}. Normally it appears in the subdirectory @file{term} of the directory where most Emacs libraries are === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2014-03-26 15:57:13 +0000 +++ doc/lispref/ChangeLog 2014-03-28 01:29:54 +0000 @@ -1,3 +1,7 @@ +2014-03-28 Glenn Morris + + * os.texi (Terminal-Specific): Mention term-file-aliases. + 2014-03-26 Eli Zaretskii * files.texi (Kinds of Files): Improve documentation of === modified file 'doc/lispref/os.texi' --- doc/lispref/os.texi 2014-03-18 01:19:03 +0000 +++ doc/lispref/os.texi 2014-03-28 01:29:54 +0000 @@ -430,10 +430,13 @@ run on that type of terminal. The library's name is constructed by concatenating the value of the variable @code{term-file-prefix} and the terminal type (specified by the environment variable @env{TERM}). -Normally, @code{term-file-prefix} has the value -@code{"term/"}; changing this is not recommended. Emacs finds the file -in the normal manner, by searching the @code{load-path} directories, and -trying the @samp{.elc} and @samp{.el} suffixes. +Normally, @code{term-file-prefix} has the value @code{"term/"}; +changing this is not recommended. If there is an entry matching +@env{TERM} in the @code{term-file-aliases} association list, +Emacs uses the associated value in place of @env{TERM}. +Emacs finds the file in the normal manner, by searching the +@code{load-path} directories, and trying the @samp{.elc} and +@samp{.el} suffixes. @cindex Termcap The usual role of a terminal-specific library is to enable special @@ -479,6 +482,13 @@ On MS-DOS, Emacs sets the @env{TERM} environment variable to @samp{internal}. @end defvar +@defvar term-file-aliases +This variable is an an association list mapping terminal types to +their aliases. For example, an element of the form @code{("vt102" +. "vt100")} means to treat a terminal of type @samp{vt102} like one of +type @samp{vt100}. +@end defvar + @defvar tty-setup-hook This variable is a normal hook that Emacs runs after initializing a new text terminal. (This applies when Emacs starts up in non-windowed === modified file 'etc/NEWS' --- etc/NEWS 2014-03-27 19:41:57 +0000 +++ etc/NEWS 2014-03-28 01:29:54 +0000 @@ -36,6 +36,11 @@ --- ** The default value of `history-length' has increased to 100. ++++ +** The new variable `term-file-aliases' replaces some files from lisp/term. +The function `tty-run-terminal-initialization' consults this variable +when deciding what terminal-specific initialization code to run. + * Editing Changes in Emacs 24.5 @@ -413,8 +418,9 @@ +++ *** `electric-indent-mode' is now enabled by default. -E.g., typing RET reindents the current line and indents the new line. -`C-j' inserts a newline but does not indent. +Typing RET reindents the current line and indents the new line. +`C-j' inserts a newline but does not indent. In some programming modes, +additional characters are electric (eg `{'). +++ *** New buffer-local `electric-indent-local-mode'. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-03-27 20:57:23 +0000 +++ lisp/ChangeLog 2014-03-28 01:29:54 +0000 @@ -1,3 +1,11 @@ +2014-03-28 Glenn Morris + + * faces.el (term-file-aliases): New variable. + (tty-run-terminal-initialization): Respect term-file-aliases. + * term/apollo.el, term/vt102.el, term/vt125.el, term/vt201.el: + * term/vt220.el, term/vt240.el, term/vt300.el, term/vt320.el: + * term/vt400.el, term/vt420.el: Remove files, replaced by aliases. + 2014-03-27 Glenn Morris * startup.el (inhibit-startup-hooks): Doc tweak. === modified file 'lisp/faces.el' --- lisp/faces.el 2014-03-22 08:28:20 +0000 +++ lisp/faces.el 2014-03-28 01:29:54 +0000 @@ -2110,16 +2110,36 @@ Specifically, `tty-run-terminal-initialization' runs this. This can be used to fine tune the `input-decode-map', for example.") +(defvar term-file-aliases + '(("apollo" . "vt100") + ("vt102" . "vt100") + ("vt125" . "vt100") + ("vt201" . "vt200") + ("vt220" . "vt200") + ("vt240" . "vt200") + ("vt300" . "vt200") + ("vt320" . "vt200") + ("vt400" . "vt200") + ("vt420" . "vt200") + ) + "Alist of terminal type aliases. +Entries are of the form (TYPE . ALIAS), where both elements are strings. +This means to treat a terminal of type TYPE as if it were of type ALIAS.") + (defun tty-run-terminal-initialization (frame &optional type run-hook) "Run the special initialization code for the terminal type of FRAME. The optional TYPE parameter may be used to override the autodetected terminal type to a different value. +This consults `term-file-aliases' to map terminal types to their aliases. + If optional argument RUN-HOOK is non-nil, then as a final step, this runs the hook `tty-setup-hook'. If you set `term-file-prefix' to nil, this function does nothing." (setq type (or type (tty-type frame))) + (let ((alias (assoc type term-file-aliases))) + (if alias (setq type (cdr alias)))) ;; Load library for our terminal type. ;; User init file can set term-file-prefix to nil to prevent this. (with-selected-frame frame === modified file 'lisp/term/AT386.el' --- lisp/term/AT386.el 2014-01-01 07:43:34 +0000 +++ lisp/term/AT386.el 2014-03-28 01:29:54 +0000 @@ -22,8 +22,6 @@ ;;; Commentary: -;; Uses the Emacs 19 terminal initialization features --- won't work with 18. - ;;; Code: (defun terminal-init-AT386 () === modified file 'lisp/term/README' --- lisp/term/README 2014-01-10 07:10:37 +0000 +++ lisp/term/README 2014-03-28 01:29:54 +0000 @@ -5,9 +5,11 @@ This directory contains files of elisp that customize Emacs for certain terminal types. - When Emacs opens a new terminal, it checks the TERM environment variable to -see what type of terminal the user is running on, searches for an elisp file -named "term/${TERM}.el", and if one exists, loads it. If Emacs finds no + When Emacs opens a new terminal, it checks the TERM environment variable +to see what type of terminal the user is running on. (If there is an entry +for TERM in the `term-file-aliases' variable, Emacs uses the associated value +in place of TERM in the following.) Emacs searches for an elisp file named +"term/${TERM}.el", and if one exists, loads it. If Emacs finds no suitable file, then it strips the last hyphen and what follows it from TERM, and tries again. If that still doesn't yield a file, then the previous hyphen is stripped, and so on until all hyphens are gone. For example, if the === removed file 'lisp/term/apollo.el' --- lisp/term/apollo.el 2012-05-01 06:59:34 +0000 +++ lisp/term/apollo.el 1970-01-01 00:00:00 +0000 @@ -1,5 +0,0 @@ -(defun terminal-init-apollo () - "Terminal initialization function for apollo." - (tty-run-terminal-initialization (selected-frame) "vt100")) - -;;; apollo.el ends here === modified file 'lisp/term/news.el' --- lisp/term/news.el 2014-01-01 07:43:34 +0000 +++ lisp/term/news.el 2014-03-28 01:29:54 +0000 @@ -22,8 +22,6 @@ ;;; Commentary: -;; Uses the Emacs 19 terminal initialization features --- won't work with 18. - ;;; Code: (defun terminal-init-news () === modified file 'lisp/term/tvi970.el' --- lisp/term/tvi970.el 2014-01-01 07:43:34 +0000 +++ lisp/term/tvi970.el 2014-03-28 01:29:54 +0000 @@ -23,8 +23,6 @@ ;;; Commentary: -;; Uses the Emacs 19 terminal initialization features --- won't work with 18. - ;;; Code: (defvar tvi970-terminal-map === modified file 'lisp/term/vt100.el' --- lisp/term/vt100.el 2014-01-01 07:43:34 +0000 +++ lisp/term/vt100.el 2014-03-28 01:29:54 +0000 @@ -22,8 +22,6 @@ ;;; Commentary: -;; Uses the Emacs 19 terminal initialization features --- won't work with 18. - ;; Handles all VT100 clones, including the Apollo terminal. Also handles ;; the VT200 --- its PF- and arrow- keys are different, but all those ;; are really set up by the terminal initialization code, which mines them === removed file 'lisp/term/vt102.el' --- lisp/term/vt102.el 2012-05-01 06:59:34 +0000 +++ lisp/term/vt102.el 1970-01-01 00:00:00 +0000 @@ -1,6 +0,0 @@ - -(defun terminal-init-vt102 () - "Terminal initialization function for vt102." - (tty-run-terminal-initialization (selected-frame) "vt100")) - -;;; vt102.el ends here === removed file 'lisp/term/vt125.el' --- lisp/term/vt125.el 2012-05-01 06:59:34 +0000 +++ lisp/term/vt125.el 1970-01-01 00:00:00 +0000 @@ -1,6 +0,0 @@ - -(defun terminal-init-vt125 () - "Terminal initialization function for vt125." - (tty-run-terminal-initialization (selected-frame) "vt100")) - -;;; vt125.el ends here === removed file 'lisp/term/vt201.el' --- lisp/term/vt201.el 2012-05-01 06:59:34 +0000 +++ lisp/term/vt201.el 1970-01-01 00:00:00 +0000 @@ -1,10 +0,0 @@ -;; For our purposes we can treat the vt200 and vt100 almost alike. -;; Most differences are handled by the termcap entry. -(defun terminal-init-vt201 () - "Terminal initialization function for vt201." - (tty-run-terminal-initialization (selected-frame) "vt100") - ;; Make F11 an escape key. - (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant. - (define-key local-function-key-map [f11] [?\e])) - -;;; vt201.el ends here === removed file 'lisp/term/vt220.el' --- lisp/term/vt220.el 2012-05-01 06:59:34 +0000 +++ lisp/term/vt220.el 1970-01-01 00:00:00 +0000 @@ -1,10 +0,0 @@ -;; For our purposes we can treat the vt200 and vt100 almost alike. -;; Most differences are handled by the termcap entry. -(defun terminal-init-vt220 () - "Terminal initialization function for vt220." - (tty-run-terminal-initialization (selected-frame) "vt100") - ;; Make F11 an escape key. - (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant. - (define-key local-function-key-map [f11] [?\e])) - -;;; vt220.el ends here === removed file 'lisp/term/vt240.el' --- lisp/term/vt240.el 2012-05-01 06:59:34 +0000 +++ lisp/term/vt240.el 1970-01-01 00:00:00 +0000 @@ -1,10 +0,0 @@ -;; For our purposes we can treat the vt200 and vt100 almost alike. -;; Most differences are handled by the termcap entry. -(defun terminal-init-vt240 () - "Terminal initialization function for vt240." - (tty-run-terminal-initialization (selected-frame) "vt100") - ;; Make F11 an escape key. - (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant. - (define-key local-function-key-map [f11] [?\e])) - -;;; vt240.el ends here === removed file 'lisp/term/vt300.el' --- lisp/term/vt300.el 2012-05-01 06:59:34 +0000 +++ lisp/term/vt300.el 1970-01-01 00:00:00 +0000 @@ -1,8 +0,0 @@ -(defun terminal-init-vt300 () - "Terminal initialization function for vt300." - (tty-run-terminal-initialization (selected-frame) "vt100") - ;; Make F11 an escape key. - (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant. - (define-key local-function-key-map [f11] [?\e])) - -;;; vt300.el ends here === removed file 'lisp/term/vt320.el' --- lisp/term/vt320.el 2012-05-01 06:59:34 +0000 +++ lisp/term/vt320.el 1970-01-01 00:00:00 +0000 @@ -1,8 +0,0 @@ -(defun terminal-init-vt320 () - "Terminal initialization function for vt320." - (tty-run-terminal-initialization (selected-frame) "vt100") - ;; Make F11 an escape key. - (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant. - (define-key local-function-key-map [f11] [?\e])) - -;;; vt320.el ends here === removed file 'lisp/term/vt400.el' --- lisp/term/vt400.el 2012-05-01 06:59:34 +0000 +++ lisp/term/vt400.el 1970-01-01 00:00:00 +0000 @@ -1,8 +0,0 @@ -(defun terminal-init-vt400 () - "Terminal initialization function for vt400." - (tty-run-terminal-initialization (selected-frame) "vt100") - ;; Make F11 an escape key. - (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant. - (define-key local-function-key-map [f11] [?\e])) - -;;; vt400.el ends here === removed file 'lisp/term/vt420.el' --- lisp/term/vt420.el 2012-05-01 06:59:34 +0000 +++ lisp/term/vt420.el 1970-01-01 00:00:00 +0000 @@ -1,8 +0,0 @@ -(defun terminal-init-vt420 () - "Terminal initialization function for vt420." - (tty-run-terminal-initialization (selected-frame) "vt100") - ;; Make F11 an escape key. - (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant. - (define-key local-function-key-map [f11] [?\e])) - -;;; vt420.el ends here === modified file 'lisp/term/wyse50.el' --- lisp/term/wyse50.el 2014-02-25 08:41:47 +0000 +++ lisp/term/wyse50.el 2014-03-28 01:29:54 +0000 @@ -23,7 +23,6 @@ ;;; Commentary: -;; Uses the Emacs 19 terminal initialization features --- won't work with 18. ;; Rewritten for Emacs 19 by jimb, January 1992 ;; Cleaned up for new terminal package conventions by esr, March 1993 ;; Should work well for Televideo TVI 925 although it's overkill. ------------------------------------------------------------ revno: 116892 committer: Paul Eggert branch nick: trunk timestamp: Thu 2014-03-27 15:52:14 -0700 message: Port recent signal-related changes to FreeBSD. Problem reported by Herbert J. Skuhra. * lisp.h (block_tty_out_signal, unblock_tty_out_signal): Move decls from here ... * syssignal.h: ... to here, so that lisp.h doesn't depend on signal.h. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-03-27 17:34:22 +0000 +++ src/ChangeLog 2014-03-27 22:52:14 +0000 @@ -1,3 +1,11 @@ +2014-03-27 Paul Eggert + + Port recent signal-related changes to FreeBSD. + Problem reported by Herbert J. Skuhra. + * lisp.h (block_tty_out_signal, unblock_tty_out_signal): + Move decls from here ... + * syssignal.h: ... to here, so that lisp.h doesn't depend on signal.h. + 2014-03-27 YAMAMOTO Mitsuharu * w32term.c (x_draw_image_glyph_string): Fix computation of height === modified file 'src/lisp.h' --- src/lisp.h 2014-03-26 15:57:13 +0000 +++ src/lisp.h 2014-03-27 22:52:14 +0000 @@ -4237,8 +4237,6 @@ extern void sys_subshell (void); extern void sys_suspend (void); extern void discard_tty_input (void); -extern void block_tty_out_signal (sigset_t *); -extern void unblock_tty_out_signal (sigset_t const *); extern void init_sys_modes (struct tty_display_info *); extern void reset_sys_modes (struct tty_display_info *); extern void init_all_sys_modes (void); === modified file 'src/syssignal.h' --- src/syssignal.h 2014-01-01 07:43:34 +0000 +++ src/syssignal.h 2014-03-27 22:52:14 +0000 @@ -20,6 +20,8 @@ #include extern void init_signals (bool); +extern void block_tty_out_signal (sigset_t *); +extern void unblock_tty_out_signal (sigset_t const *); #ifdef HAVE_PTHREAD #include ------------------------------------------------------------ revno: 116891 committer: Paul Eggert branch nick: trunk timestamp: Thu 2014-03-27 14:29:32 -0700 message: * configure.ac: Suggest './configure MAKE=gmake' in diagnostic. This tends to work better than 'MAKE=gmake ./configure' if later builds run config.status etc. diff: === modified file 'ChangeLog' --- ChangeLog 2014-03-27 19:41:57 +0000 +++ ChangeLog 2014-03-27 21:29:32 +0000 @@ -1,3 +1,9 @@ +2014-03-27 Paul Eggert + + * configure.ac: Suggest './configure MAKE=gmake' in diagnostic. + This tends to work better than 'MAKE=gmake ./configure' if later + builds run config.status etc. + 2014-03-27 Glenn Morris * configure.ac: Require GNU make. === modified file 'configure.ac' --- configure.ac 2014-03-27 19:41:57 +0000 +++ configure.ac 2014-03-27 21:29:32 +0000 @@ -665,8 +665,8 @@ else AC_MSG_RESULT([no]) AC_MSG_ERROR([Building Emacs requires GNU make. -If you have it installed under a name other than 'make', -set the MAKE environment variable, and try again.]) +If you have it installed under another name, configure with 'MAKE=...'. +For example, run './configure MAKE=gmake'.]) fi ------------------------------------------------------------ revno: 116890 committer: Glenn Morris branch nick: trunk timestamp: Thu 2014-03-27 16:57:23 -0400 message: Simplify treatment of some startup hooks * lisp/startup.el (inhibit-startup-hooks): Doc tweak. (normal-top-level): Simplify running of hooks. For window-setup-hook, respect inhibit-startup-hooks. (command-line-1): Don't set window-setup-hook to nil. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-03-27 19:00:49 +0000 +++ lisp/ChangeLog 2014-03-27 20:57:23 +0000 @@ -1,5 +1,10 @@ 2014-03-27 Glenn Morris + * startup.el (inhibit-startup-hooks): Doc tweak. + (normal-top-level): Simplify running of hooks. + For window-setup-hook, respect inhibit-startup-hooks. + (command-line-1): Don't set window-setup-hook to nil. + Allow selective autoloading from obsolete/ directory. * Makefile.in (obsolete-autoloads): New rule. (autoloads): Run obsolete-autoloads. === modified file 'lisp/startup.el' --- lisp/startup.el 2014-03-22 23:47:20 +0000 +++ lisp/startup.el 2014-03-27 20:57:23 +0000 @@ -292,8 +292,9 @@ `tty-setup-hook' instead." "24.4") (defvar inhibit-startup-hooks nil - "Non-nil means don't run `term-setup-hook' and `emacs-startup-hook'. -This is because we already did so.") + "Non-nil means don't run some startup hooks, because we already did. +Currently this applies to: `emacs-startup-hook', `term-setup-hook', +and `window-setup-hook'.") (defvar keyboard-type nil "The brand of keyboard you are using. @@ -644,9 +645,7 @@ (emacs-pid) (system-name)))))))) (unless inhibit-startup-hooks - (run-hooks 'emacs-startup-hook) - (and term-setup-hook - (run-hooks 'term-setup-hook))) + (run-hooks 'emacs-startup-hook 'term-setup-hook)) ;; Don't do this if we failed to create the initial frame, ;; for instance due to a dense colormap. @@ -682,8 +681,8 @@ ;; Now we know the user's default font, so add it to the menu. (if (fboundp 'font-menu-add-default) (font-menu-add-default)) - (and window-setup-hook - (run-hooks 'window-setup-hook)))) + (unless inhibit-startup-hooks + (run-hooks 'window-setup-hook)))) ;; Subprocesses of Emacs do not have direct access to the terminal, so ;; unless told otherwise they should only assume a dumb terminal. ;; We are careful to do it late (after term-setup-hook), although the @@ -2431,10 +2430,7 @@ ;; If there are no switches to process, we might as well ;; run this hook now, and there may be some need to do it ;; before doing any output. - (run-hooks 'emacs-startup-hook) - (and term-setup-hook - (run-hooks 'term-setup-hook)) - (setq inhibit-startup-hooks t) + (run-hooks 'emacs-startup-hook 'term-setup-hook) ;; It's important to notice the user settings before we ;; display the startup message; otherwise, the settings @@ -2446,10 +2442,9 @@ ;; If there are no switches to process, we might as well ;; run this hook now, and there may be some need to do it ;; before doing any output. - (when window-setup-hook - (run-hooks 'window-setup-hook) - ;; Don't let the hook be run twice. - (setq window-setup-hook nil)) + (run-hooks 'window-setup-hook) + + (setq inhibit-startup-hooks t) ;; ;; Do this now to avoid an annoying delay if the user ;; ;; clicks the menu bar during the sit-for. ------------------------------------------------------------ revno: 116889 committer: Glenn Morris branch nick: trunk timestamp: Thu 2014-03-27 15:41:57 -0400 message: Require GNU make to build Emacs Ref: http://debbugs.gnu.org/16717#45 If no-one objects, we can then start getting rid of some of the convoluted Makefile hacks that exist to support non-GNU makes. * configure.ac: Require GNU make. (HAVE_GNU_MAKE): Remove. * INSTALL, etc/NEWS, etc/PROBLEMS: Update for this change. * Makefile.in: Comment. diff: === modified file 'ChangeLog' --- ChangeLog 2014-03-26 15:57:13 +0000 +++ ChangeLog 2014-03-27 19:41:57 +0000 @@ -1,3 +1,8 @@ +2014-03-27 Glenn Morris + + * configure.ac: Require GNU make. + (HAVE_GNU_MAKE): Remove. + 2014-03-26 Paul Eggert Merge from gnulib, incorporating: === modified file 'INSTALL' --- INSTALL 2014-03-22 22:52:47 +0000 +++ INSTALL 2014-03-27 19:41:57 +0000 @@ -24,6 +24,9 @@ `src/config.h' file containing system-dependent definitions. Running the `make' utility then builds the package for your system. +Building Emacs requires GNU make, . +On most systems that Emacs supports, this is the default `make' program. + Here's the procedure to build Emacs using `configure' on systems which are supported by it. In some cases, if the simplified procedure fails, you might need to use various non-default options, and maybe perform @@ -49,7 +52,6 @@ SOURCE-DIR/configure where SOURCE-DIR is the top-level Emacs source directory. - This may not work unless you use GNU make. 3. When `configure' finishes, it prints several lines of details about the system configuration. Read those details carefully @@ -435,12 +437,8 @@ where Emacs's configure script is located. `configure' looks for the Emacs source code in the directory that `configure' is in. -To build in a separate directory, you must use a version of `make' -that supports the `VPATH' variable, such as GNU `make'. - -(Do not try to build in a separate directory by creating many links -to the real source directory--there is no need, and installation will -fail.) +(Do not try to build in a separate directory by creating many links to +the real source directory--there is no need, and installation will fail.) 4) Put into `./lisp/site-init.el' or `./lisp/site-load.el' any Emacs Lisp code you want Emacs to load before it is dumped out. Use === modified file 'Makefile.in' --- Makefile.in 2014-03-21 06:49:38 +0000 +++ Makefile.in 2014-03-27 19:41:57 +0000 @@ -60,8 +60,8 @@ SHELL = @SHELL@ -# This may not work with certain non-GNU make's. It only matters when -# inheriting a CDPATH not starting with the current directory. +# This only matters when inheriting a CDPATH not starting with the +# current directory. CDPATH= # If Make doesn't predefine MAKE, set it here. === modified file 'configure.ac' --- configure.ac 2014-03-26 01:14:44 +0000 +++ configure.ac 2014-03-27 19:41:57 +0000 @@ -441,8 +441,7 @@ AC_ARG_ENABLE(autodepend, [AS_HELP_STRING([--enable-autodepend], [automatically generate dependencies to .h-files. - Requires GNU Make and Gcc. Enabled if GNU Make and Gcc is - found])], + Requires gcc, enabled if found.])], [ac_enable_autodepend="${enableval}"],[ac_enable_autodepend=yes]) AC_ARG_ENABLE(gtk-deprecation-warnings, @@ -659,6 +658,18 @@ fi +AC_MSG_CHECKING([whether we are using GNU Make]) +testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'` +if test "x$testval" != x; then + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) + AC_MSG_ERROR([Building Emacs requires GNU make. +If you have it installed under a name other than 'make', +set the MAKE environment variable, and try again.]) +fi + + #### Choose a compiler. dnl Sets GCC=yes if using gcc. @@ -1526,27 +1537,16 @@ DEPFLAGS= MKDEPDIR=":" deps_frag=deps.mk -dnl check for GNU Make if we have GCC and autodepend is on. +dnl check if we have GCC and autodepend is on. if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then - AC_MSG_CHECKING([whether we are using GNU Make]) - HAVE_GNU_MAKE=no - testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'` - if test "x$testval" != x; then - HAVE_GNU_MAKE=yes - else - ac_enable_autodepend=no - fi - AC_MSG_RESULT([$HAVE_GNU_MAKE]) - if test $HAVE_GNU_MAKE = yes; then - AC_MSG_CHECKING([whether gcc understands -MMD -MF]) - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -MMD -MF deps.d -MP" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], , ac_enable_autodepend=no) - CFLAGS="$SAVE_CFLAGS" - test -f deps.d || ac_enable_autodepend=no - rm -rf deps.d - AC_MSG_RESULT([$ac_enable_autodepend]) - fi + AC_MSG_CHECKING([whether gcc understands -MMD -MF]) + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -MMD -MF deps.d -MP" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], , ac_enable_autodepend=no) + CFLAGS="$SAVE_CFLAGS" + test -f deps.d || ac_enable_autodepend=no + rm -rf deps.d + AC_MSG_RESULT([$ac_enable_autodepend]) if test $ac_enable_autodepend = yes; then DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP' ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe. === modified file 'etc/NEWS' --- etc/NEWS 2014-03-26 01:41:13 +0000 +++ etc/NEWS 2014-03-27 19:41:57 +0000 @@ -24,6 +24,9 @@ * Installation Changes in Emacs 24.5 ++++ +** Building Emacs now requires GNU make. + * Startup Changes in Emacs 24.5 === modified file 'etc/PROBLEMS' --- etc/PROBLEMS 2014-03-23 06:02:36 +0000 +++ etc/PROBLEMS 2014-03-27 19:41:57 +0000 @@ -2544,27 +2544,6 @@ This is due to a bug in the bcopy implementation in openSUSE 10.3. It is/will be fixed in an openSUSE update. -** Installation - -*** On Solaris, use GNU Make when installing an out-of-tree build - -The Emacs configuration process allows you to configure the -build environment so that you can build emacs in a directory -outside of the distribution tree. When installing Emacs from an -out-of-tree build directory on Solaris, you may need to use GNU -make. The make programs bundled with Solaris support the VPATH -macro but use it differently from the way the VPATH macro is -used by GNU make. The differences will cause the "make install" -step to fail, leaving you with an incomplete emacs -installation. GNU make is available in /usr/sfw/bin on Solaris -10 and can be installed as /opt/sfw/bin/gmake from the Solaris 9 -Software Companion CDROM. - -The problems due to the VPATH processing differences affect only -out of tree builds so, if you are on a Solaris installation -without GNU make, you can install Emacs completely by installing -from a build environment using the original emacs distribution tree. - ** First execution *** Emacs binary is not in executable format, and cannot be run. ------------------------------------------------------------ revno: 116888 committer: Glenn Morris branch nick: trunk timestamp: Thu 2014-03-27 15:00:49 -0400 message: Allow selective autoloading from lisp/obsolete directory * lisp/Makefile.in (obsolete-autoloads): New rule. (autoloads): Run obsolete-autoloads. * lisp/obsolete/iswitchb.el (iswitchb-mode): Use obsolete-autoload. * lisp/simple.el (iswitchb-mode): Remove hand-written autoloads. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-03-27 17:34:22 +0000 +++ lisp/ChangeLog 2014-03-27 19:00:49 +0000 @@ -1,3 +1,11 @@ +2014-03-27 Glenn Morris + + Allow selective autoloading from obsolete/ directory. + * Makefile.in (obsolete-autoloads): New rule. + (autoloads): Run obsolete-autoloads. + * obsolete/iswitchb.el (iswitchb-mode): Use obsolete-autoload. + * simple.el (iswitchb-mode): Remove hand-written autoloads. + 2014-03-27 Dmitry Gutov * progmodes/ruby-mode.el (ruby-font-lock-keywords): Highlight === modified file 'lisp/Makefile.in' --- lisp/Makefile.in 2014-03-21 07:22:41 +0000 +++ lisp/Makefile.in 2014-03-27 19:00:49 +0000 @@ -196,6 +196,17 @@ --eval '(setq autoload-builtin-package-versions t)' \ --eval '(setq generated-autoload-file (expand-file-name (unmsys--file-name "$(srcdir)/loaddefs.el")))' \ -f batch-update-autoloads $$wins + $(MAKE) $(MFLAGS) obsolete-autoloads + +# The obsolete/ subdirectory is normally not scanned for autoloads. +# Sometimes we still want to autoload something from that directory, +# eg iswitchb. +.PHONY: obsolete-autoloads +obsolete-autoloads: ${lisp}/obsolete/*.el + $(emacs) -l autoload \ + --eval '(setq generate-autoload-cookie ";;;###obsolete-autoload")' \ + --eval '(setq generated-autoload-file (expand-file-name (unmsys--file-name "$(srcdir)/loaddefs.el")))' \ + -f batch-update-autoloads ${lisp}/obsolete # This is required by the bootstrap-emacs target in ../src/Makefile, so # we know that if we have an emacs executable, we also have a subdirs.el. === modified file 'lisp/obsolete/iswitchb.el' --- lisp/obsolete/iswitchb.el 2014-02-07 03:22:34 +0000 +++ lisp/obsolete/iswitchb.el 2014-03-27 19:00:49 +0000 @@ -1416,10 +1416,7 @@ (isearch-no-upper-case-p iswitchb-text) (isearch-no-upper-case-p iswitchb-text t)))) -;; NB obsolete/ is not scanned for autoloads. -;; If you change any of the following doc, copy the changes to simple.el. - -;;;###autoload +;;;###obsolete-autoload (define-minor-mode iswitchb-mode "Toggle Iswitchb mode. With a prefix argument ARG, enable Iswitchb mode if ARG is @@ -1433,7 +1430,7 @@ (add-hook 'minibuffer-setup-hook 'iswitchb-minibuffer-setup) (remove-hook 'minibuffer-setup-hook 'iswitchb-minibuffer-setup))) -;;;###autoload +;;;###obsolete-autoload (make-obsolete 'iswitchb-mode "use `icomplete-mode' or `ido-mode' instead." "24.4") === modified file 'lisp/simple.el' --- lisp/simple.el 2014-03-26 21:01:47 +0000 +++ lisp/simple.el 2014-03-27 19:00:49 +0000 @@ -7814,31 +7814,6 @@ command-name))))))) -;; This is here because files in obsolete/ are not scanned for autoloads. - -(defvar iswitchb-mode nil "\ -Non-nil if Iswitchb mode is enabled. -See the command `iswitchb-mode' for a description of this minor mode. -Setting this variable directly does not take effect; -either customize it (see the info node `Easy Customization') -or call the function `iswitchb-mode'.") - -(custom-autoload 'iswitchb-mode "iswitchb" nil) - -(autoload 'iswitchb-mode "iswitchb" "\ -Toggle Iswitchb mode. -With a prefix argument ARG, enable Iswitchb mode if ARG is -positive, and disable it otherwise. If called from Lisp, enable -the mode if ARG is omitted or nil. - -Iswitchb mode is a global minor mode that enables switching -between buffers using substrings. See `iswitchb' for details. - -\(fn &optional ARG)" t nil) - -(make-obsolete 'iswitchb-mode - "use `icomplete-mode' or `ido-mode' instead." "24.4") - (provide 'simple) ------------------------------------------------------------ revno: 116887 committer: Glenn Morris branch nick: trunk timestamp: Thu 2014-03-27 14:22:27 -0400 message: Add vhdl-mode.info build rules * doc/misc/Makefile.in (INFO_COMMON): Add vhdl-mode. (vhdl_mode_deps, vhdl-mode, $(buildinfodir)/vhdl-mode$(INFO_EXT)) (vhdl-mode.dvi, vhdl-mode.pdf, vhdl-mode.html): New rules/variables. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2014-03-27 18:20:08 +0000 +++ doc/misc/ChangeLog 2014-03-27 18:22:27 +0000 @@ -1,5 +1,9 @@ 2014-03-27 Glenn Morris + * Makefile.in (INFO_COMMON): Add vhdl-mode. + (vhdl_mode_deps, vhdl-mode, $(buildinfodir)/vhdl-mode$(INFO_EXT)) + (vhdl-mode.dvi, vhdl-mode.pdf, vhdl-mode.html): New rules/variables. + * vhdl-mode.texi: General clean-up. Set copyright to FSF, add license. Remove hand-written node pointers. Remove info re old Emacs versions. Markup fixes. === modified file 'doc/misc/Makefile.in' --- doc/misc/Makefile.in 2014-01-15 18:27:51 +0000 +++ doc/misc/Makefile.in 2014-03-27 18:22:27 +0000 @@ -70,7 +70,7 @@ mairix-el message mh-e newsticker nxml-mode octave-mode \ org pcl-cvs pgg rcirc remember reftex sasl \ sc semantic ses sieve smtpmail speedbar srecode todo-mode tramp \ - url vip viper widget wisent woman + url vhdl-mode vip viper widget wisent woman ## Info files to install on current platform. INFO_INSTALL = $(INFO_COMMON) $(DOCMISC_INFO_W32) @@ -792,6 +792,18 @@ url.html: $(url_deps) $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/url.texi +vhdl_mode_deps = ${srcdir}/vhdl-mode.texi ${gfdl} +vhdl-mode : $(buildinfodir)/vhdl-mode$(INFO_EXT) +$(buildinfodir)/vhdl-mode$(INFO_EXT): $(vhdl_mode_deps) + $(mkinfodir) + $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/vhdl-mode.texi +vhdl-mode.dvi: $(vhdl_mode_deps) + $(ENVADD) $(TEXI2DVI) ${srcdir}/vhdl-mode.texi +vhdl-mode.pdf: $(vhdl_mode_deps) + $(ENVADD) $(TEXI2PDF) ${srcdir}/vhdl-mode.texi +vhdl-mode.html: $(vhdl_mode_deps) + $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/vhdl-mode.texi + vip_deps = ${srcdir}/vip.texi ${gfdl} vip : $(buildinfodir)/vip$(INFO_EXT) $(buildinfodir)/vip$(INFO_EXT): $(vip_deps) ------------------------------------------------------------ revno: 116886 committer: Glenn Morris branch nick: trunk timestamp: Thu 2014-03-27 14:20:08 -0400 message: vhdl-mode.texi clean-up * doc/misc/vhdl-mode.texi: General clean-up. Set copyright to FSF (years based on vhdl-mode releases), add license. Remove hand-written node pointers. Remove info re old Emacs versions. Markup fixes. (Getting Connected): Remove irrelevant info. (Indentation Commands, Requirements): Remove empty/irrelevant nodes. (Frequently Asked Questions): Electric indent is now enabled. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2014-03-27 18:18:15 +0000 +++ doc/misc/ChangeLog 2014-03-27 18:20:08 +0000 @@ -1,3 +1,12 @@ +2014-03-27 Glenn Morris + + * vhdl-mode.texi: General clean-up. Set copyright to FSF, add license. + Remove hand-written node pointers. Remove info re old Emacs versions. + Markup fixes. + (Getting Connected): Remove irrelevant info. + (Indentation Commands, Requirements): Remove empty/irrelevant nodes. + (Frequently Asked Questions): Electric indent is now enabled. + 2014-03-27 Reto Zimmermann Rod Whitby === modified file 'doc/misc/vhdl-mode.texi' --- doc/misc/vhdl-mode.texi 2014-03-27 18:18:15 +0000 +++ doc/misc/vhdl-mode.texi 2014-03-27 18:20:08 +0000 @@ -1,87 +1,60 @@ \input texinfo @c -*- texinfo -*- -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@comment %**start of header (This is for running Texinfo on a region) -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -@setfilename vhdl-mode.info -@settitle VHDL Mode Version 3 Documentation -@footnotestyle end - -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@comment @setchapternewpage odd !! we don't want blank pages !! -@comment %**end of header (This is for running Texinfo on a region) -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - - -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@comment -@comment texinfo manual for @file{vhdl-mode.el} version 3 -@comment manual version: 3.1 -@comment adapted from the VHDL Mode texinfo manual version 2 by -@comment Rodney J. Whitby -@comment adapted from the CC Mode texinfo manual by Barry A. Warsaw -@comment -@comment -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - - -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@comment The following line inserts the copyright notice -@comment into the Info file. -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -@ifinfo -Copyright @copyright{} 1997 - 2002 Reto Zimmermann -Copyright @copyright{} 1995 - 1997 Rodney J. Whitby -@end ifinfo - -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@comment !!!The titlepage section does not appear in the Info file.!!! -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@setfilename ../../info/vhdl-mode +@settitle VHDL Mode, an Emacs mode for editing VHDL code + +@c Adapted from the VHDL Mode texinfo manual version 2 by Rodney J. Whitby. +@c Adapted from the CC Mode texinfo manual by Barry A. Warsaw. + +@copying +This file documents VHDL Mode, an Emacs mode for editing VHDL code. + +Copyright @copyright{} 1995--2008, 2010, 2012, 2014 Free Software +Foundation, Inc. + +@quotation +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with no +Invariant Sections, with the Front-Cover texts being ``A GNU Manual,'' +and with the Back-Cover Texts as in (a) below. A copy of the license +is included in the section entitled ``GNU Free Documentation License.'' + +(a) The FSF's Back-Cover Text is: ``You have the freedom to copy and +modify this GNU manual.'' +@end quotation +@end copying + +@dircategory Emacs editing modes +@direntry +* VHDL Mode: (vhdl-mode). Emacs mode for editing VHDL code. +@end direntry + +@finalout @titlepage -@sp 10 - - -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@comment The title is printed in a large font. -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -@center @titlefont{VHDL Mode Version 3} -@sp 2 -@center A GNU Emacs mode for editing VHDL code. -@center (manual revision: 3.1) -@sp 2 -@center Reto Zimmermann -@center @code{Reto.Zimmermann@@iaeth.ch} -@center Rod Whitby -@center @code{rwhitby@@geocities.com} - - -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@comment The following two commands start the copyright page -@comment for the printed manual. This will not appear in the Info file. -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@title VHDL Mode +@sp 2 +@subtitle A GNU Emacs mode for editing VHDL code. +@sp 2 +@author Reto Zimmermann +@author @email{reto@@gnu.org} +@author Rod Whitby +@author @email{software.vhdl-mode@@rwhitby.net} @page @vskip 0pt plus 1filll -Copyright @copyright{} 1997 Reto Zimmermann -Copyright @copyright{} 1995 - 1997 Rodney J. Whitby +@insertcopying @end titlepage - -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@comment The Top node contains the master menu for the Info file. -@comment This appears only in the Info file, not the printed manual. -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -@node Top, Introduction, (dir), (dir) -@comment node-name, next, previous, up - - -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@contents + +@ifnottex +@node Top +@top VHDL Mode, an Emacs mode for editing VHDL code + +@insertcopying +@end ifnottex @menu * Introduction:: @@ -89,29 +62,24 @@ * New Indentation Engine:: * Customizing Indentation:: * Syntactic Symbols:: -* Indentation Commands:: * Frequently Asked Questions:: * Getting the latest VHDL Mode release:: * Sample .emacs File:: -* Requirements:: -* Limitations and Known Bugs:: +* Limitations and Known Bugs:: * Mailing Lists and Submitting Bug Reports:: +* GNU Free Documentation License:: The license for this documentation. * Concept Index:: * Command Index:: Command Index * Key Index:: Key Index * Variable Index:: Variable Index @end menu -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -@node Introduction, Getting Connected, Top, Top -@comment node-name, next, previous, up +@node Introduction @chapter Introduction @cindex Introduction -Welcome to VHDL Mode version 3. This is a GNU Emacs mode for editing -files containing VHDL code. +Welcome to VHDL Mode. This is a GNU Emacs mode for editing files +containing VHDL code. This manual will describe the following: @@ -145,120 +113,17 @@ customization of most variables are available through the menu, which makes everything highly self-explaining. - -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -@node Getting Connected, New Indentation Engine, Introduction, Top -@comment node-name, next, previous, up +@node Getting Connected @chapter Getting Connected @cindex Getting Connected -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -VHDL Mode works well under GNU Emacs 20 and XEmacs 19.15 and higher. -GNU Emacs 19 is not supported anymore since several new features of -Emacs 20 are used in this VHDL Mode version (you can download VHDL -Mode version 1.10 for Emacs 19). - -@cindex .emacs file -The first thing you will want to do is put @file{vhdl-mode.el} somewhere -on your @code{load-path} so Emacs can find it. Do a @kbd{C-h v -load-path RET} to see all the directories Emacs looks at when loading a -file. If none of these directories are appropriate, create a new -directory and add it to your @code{load-path}: - -@noindent -@emph{[in the shell]} -@example -@group - -% cd -% mkdir mylisp -% mv vhdl-mode.el mylisp -% cd mylisp - -@end group -@end example - -@noindent -@emph{[in your .emacs file add]} -@example - -(setq load-path (cons "~/mylisp" load-path)) - -@end example - -@cindex byte compile -Next you want to @dfn{byte compile} @file{vhdl-mode.el}. The mode uses a -lot of macros so if you don't byte compile it, things will be unbearably -slow. @emph{You can ignore all byte-compiler warnings!} They are the -result of the supporting different versions of Emacs, and none of the -warnings have any effect on operation. Let me say this again: -@strong{You really can ignore all byte-compiler warnings!} - -Here's what to do to byte-compile the file [in emacs]: -@example - -M-x byte-compile-file RET ~/mylisp/vhdl-mode.el RET - -@end example - -Now add the following autoloads to your @file{.emacs} file so that -@code{vhdl-mode} gets loaded at the right time: -@example - -(autoload 'vhdl-mode "vhdl-mode" "VHDL Editing Mode" t) - -@end example - -Alternatively, if you want to make sure VHDL Mode is loaded when -Emacs starts up, you could use this line instead of the autoload above: -@example - -(require 'vhdl-mode) - -@end example - -Next, you will want to set up Emacs so that it edits VHDL files in -VHDL Mode. All users should add the following to their -@file{.emacs} file. Note that this assumes you'll be editing @code{.vhd} -and files as VHDL. YMMV: -@example -@group - -(setq auto-mode-alist - (append - '(("\\.vhd$" . vhdl-mode) - ) auto-mode-alist)) - -@end group -@end example - -That's all you need -- I know, I know, it sounds like a lot @code{:-)}, -but after you've done all this, you should only need to quit and restart -Emacs. The next time you visit a VHDL file you should be using -VHDL Mode. You can check this easily by hitting @kbd{M-x -vhdl-version RET} in the VHDL Mode buffer. You should see this -message in the echo area: -@example - -Using VHDL Mode version 3.@var{XX} - -@end example - -@noindent -where @var{XX} will be some minor revision number. - -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -@node New Indentation Engine, Indentation Commands, Getting Connected, Top -@comment node-name, next, previous, up - +To get started, simply visit a @file{.vhd} file in Emacs; or type +@kbd{M-x vhdl-mode RET}. + +@node New Indentation Engine @chapter New Indentation Engine @cindex New Indentation Engine -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - VHDL Mode has a new indentation engine, providing a simplified, yet flexible and general mechanism for customizing indentation. It breaks indentation calculation into two steps. First for the line of code being @@ -271,19 +136,14 @@ being used so that you will know how to customize VHDL Mode for your personal coding style. -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @menu * Syntactic Analysis:: Step 1 -- Syntactic Analysis * Indentation Calculation:: Step 2 -- Indentation Calculation @end menu -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Syntactic Analysis, Indentation Calculation, , New Indentation Engine -@comment node-name, next, previous, up +@node Syntactic Analysis @section Syntactic Analysis @cindex Syntactic Analysis -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @vindex vhdl-offsets-alist @vindex offsets-alist (vhdl-) @@ -375,12 +235,9 @@ components. Also notice that the first component, @samp{(comment-intro)} has no relative buffer position. -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Indentation Calculation, , Syntactic Analysis, New Indentation Engine -@comment node-name, next, previous, up +@node Indentation Calculation @section Indentation Calculation @cindex Indentation Calculation -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @vindex vhdl-offsets-alist @vindex offsets-alist (vhdl-) @@ -451,23 +308,18 @@ the minibuffer when you hit @kbd{TAB}. -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Indentation Commands, Customizing Indentation, New Indentation Engine, Top -@comment node-name, next, previous, up - +@ignore +@node Indentation Commands @chapter Indentation Commands @cindex Indentation Commands -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @strong{} - -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Customizing Indentation, Syntactic Symbols, Indentation Commands, Top -@comment node-name, next, previous, up - +@end ignore + + +@node Customizing Indentation @chapter Customizing Indentation @cindex Customizing Indentation -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @cindex vhdl-set-offset @cindex set-offset (vhdl-) @@ -478,7 +330,7 @@ interactively and from your mode hook. Also, you can set up @emph{styles} of indentation. Most likely, you'll find one of the pre-defined styles will suit your needs, but if not, this section will -describe how to set up basic editing configurations. @xref{Styles} for +describe how to set up basic editing configurations. @xref{Styles}, for an explanation of how to set up named styles. @cindex vhdl-basic-offset @@ -532,13 +384,9 @@ * Advanced Customizations:: @end menu -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Interactive Customization, Permanent Customization, , Customizing Indentation -@comment node-name, next, previous, up - +@node Interactive Customization @section Interactive Customization @cindex Interactive Customization -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! As an example of how to customize indentation, let's change the style of the example above from: @@ -620,13 +468,9 @@ always start adjusting offsets for lines higher up in the file, then re-indent and see if any following lines need further adjustments. -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Permanent Customization, Styles, Interactive Customization, Customizing Indentation -@comment node-name, next, previous, up - +@node Permanent Customization @section Permanent Indentation @cindex Permanent Indentation -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @vindex vhdl-mode-hook @cindex hooks @@ -639,11 +483,8 @@ file to make the changes described in the previous section (@ref{Interactive Customization}) more permanent. See the Emacs manuals for more information on customizing Emacs via hooks. -@xref{Sample .emacs File} for a more complete sample @file{.emacs} file. -@footnote{The use of @code{add-hook} in this example only works for -Emacs 19. Workarounds are available if you are using Emacs 18, but this -just points out another reason for you to upgrade to Emacs 19! -@code{:-)}} +@xref{Sample .emacs File}, for a more complete sample @file{.emacs} file. + @example @group @@ -659,19 +500,15 @@ For complex customizations, you will probably want to set up a @emph{style} that groups all your customizations under a single -name. @xref{Styles} for details. +name. @xref{Styles}. The offset value can also be a function, and this is how power users -gain enormous flexibility in customizing indentation. @xref{Advanced -Customizations} for details. - -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Styles, Advanced Customizations, Permanent Customization, Customizing Indentation -@comment node-name, next, previous, up - +gain enormous flexibility in customizing indentation. @xref{Advanced +Customizations}. + +@node Styles @section Styles @cindex Styles -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Most people only need to edit code formatted in just a few well-defined and consistent styles. For example, their organization might impose a @@ -692,13 +529,9 @@ @end menu -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Built-in Styles, Adding Styles, , Styles -@comment node-name, next, previous, up - +@node Built-in Styles @subsection Built-in Styles @cindex Built-in Styles -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! If you're lucky, one of VHDL Mode's built-in styles might be just what you're looking for. Some of the most common VHDL styles are @@ -714,20 +547,15 @@ @findex vhdl-set-style @findex set-style (vhdl-) If you'd like to experiment with these built-in styles you can simply -type the following in a VHDL Mode buffer: -@example -@group - -@kbd{M-x vhdl-set-style RET}. - -@end group -@end example -@noindent +type @kbd{M-x vhdl-set-style RET} in a VHDL Mode buffer. + You will be prompted for one of the above styles (with completion). Enter one of the styles and hit @kbd{RET}. Note however that setting a style in this way does @emph{not} automatically re-indent your file. +@ignore For commands that you can use to view the effect of your changes, see @ref{Indentation Commands}. +@end ignore Once you find a built-in style you like, you can make the change permanent by adding a call to your @file{.emacs} file. Let's say for @@ -749,13 +577,9 @@ @noindent @xref{Permanent Customization}. -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Adding Styles, File Styles, Built-in Styles, Styles -@comment node-name, next, previous, up - +@node Adding Styles @subsection Adding Styles @cindex Adding Styles -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @vindex vhdl-style-alist @vindex style-alist (vhdl-) @@ -777,13 +601,9 @@ The sample @file{.emacs} file provides a concrete example of how a new style can be added and automatically set. @xref{Sample .emacs File}. -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node File Styles, , Adding Styles, Styles -@comment node-name, next, previous, up - +@node File Styles @subsection File Styles @cindex File Styles -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @cindex local variables The Emacs manual describes how you can customize certain variables on a @@ -816,13 +636,9 @@ before file offset settings (i.e. @code{vhdl-file-offsets}). -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Advanced Customizations, , Styles, Customizing Indentation -@comment node-name, next, previous, up - +@node Advanced Customizations @section Advanced Customizations @cindex Advanced Customizations -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @vindex vhdl-style-alist @vindex style-alist (vhdl-) @@ -844,13 +660,9 @@ * Other Special Indentations:: @end menu -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Custom Indentation Functions, Other Special Indentations, , Advanced Customizations -@comment node-name, next, previous, up - +@node Custom Indentation Functions @subsection Custom Indentation Functions @cindex Custom Indentation Functions -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @cindex custom indentation functions One of the most common ways to customize VHDL Mode is by writing @@ -959,13 +771,9 @@ using many custom indentation functions may have a performance impact on VHDL Mode. -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Other Special Indentations, , Custom Indentation Functions, Advanced Customizations -@comment node-name, next, previous, up - +@node Other Special Indentations @subsection Other Special Indentations @cindex Other Special Indentations -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @vindex vhdl-special-indent-hook @vindex special-indent-hook (vhdl-) @@ -979,13 +787,9 @@ functions. -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Syntactic Symbols, Frequently Asked Questions, Customizing Indentation, Top -@comment node-name, next, previous, up - +@node Syntactic Symbols @chapter Syntactic Symbols @cindex Syntactic Symbols -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @vindex vhdl-offsets-alist The complete list of recognized syntactic symbols is described in the @@ -1012,13 +816,9 @@ @strong{ include the name and a brief example of every syntactic symbol currently recognized} -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Frequently Asked Questions, Getting the latest VHDL Mode release, Syntactic Symbols, Top -@comment node-name, next, previous, up - +@node Frequently Asked Questions @chapter Frequently Asked Questions @cindex Frequently Asked Questions -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @kindex C-x h @kindex ESC C-\ @@ -1057,24 +857,6 @@ C-q}. @sp 2 -@strong{Q.} @emph{Why doesn't the @key{RET} key indent the line to -where the new text should go after inserting the newline?} - -@strong{A.} Emacs' convention is that @key{RET} just adds a newline, -and that @key{LFD} adds a newline and indents it. You can make -@key{RET} do this too by adding this to your -@code{vhdl-mode-hook} (see the sample @file{.emacs} file -@ref{Sample .emacs File}): -@example - -(define-key vhdl-mode-map "\C-m" 'newline-and-indent) - -@end example - -This is a very common question. @code{:-)} If you want this to be the -default behavior, don't lobby me, lobby RMS! -@sp 2 - @strong{Q.} @emph{I put @code{(vhdl-set-offset 'statement-cont 0)} in my @file{.emacs} file but I get an error saying that @code{vhdl-set-offset}'s function definition is void.} @@ -1097,31 +879,23 @@ @end quotation -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Getting the latest VHDL Mode release, Sample .emacs File, Frequently Asked Questions, Top -@comment node-name, next, previous, up - +@node Getting the latest VHDL Mode release @chapter Getting the latest VHDL Mode release @cindex Getting the latest VHDL Mode release -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! The best way to be sure you always have the latest VHDL Mode release is to join the @code{vhdl-mode-announce} mailing list. If you are a brave soul, and wish to participate in beta testing of new releases of VHDL Mode, you may also join the @code{vhdl-mode-victims} mailing -list. Send email to the maintainer to join +list. Send email to the maintainer @email{reto@@gnu.org} to join either of these lists. The official Emacs VHDL Mode Home Page can be found at -. - -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Sample .emacs File, Requirements, Getting the latest VHDL Mode release, Top -@comment node-name, next, previous, up - +@uref{http://www.iis.ee.ethz.ch/~zimmi/emacs/vhdl-mode.html}. + +@node Sample .emacs File @chapter Sample @file{.emacs} file @cindex Sample @file{.emacs} file -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Most customizations can be done using the `Customize' entry in the VHDL Mode menu, which requires no editing of the .emacs file. @@ -1157,43 +931,27 @@ (define-key vhdl-mode-map "\C-m" 'newline-and-indent) ) -;; the following only works in Emacs 19 -;; Emacs 18ers can use (setq vhdl-mode-hook 'my-vhdl-mode-hook) (add-hook 'vhdl-mode-hook 'my-vhdl-mode-hook) @end example -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Requirements, Limitations and Known Bugs, Sample .emacs File, Top -@comment node-name, next, previous, up -@chapter Requirements -@cindex Requirements -@comment * Requirements -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -All required files are distributed with GNU Emacs 20 and XEmacs 19.15. - -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Limitations and Known Bugs, Mailing Lists and Submitting Bug Reports, Requirements, Top -@comment node-name, next, previous, up +@node Limitations and Known Bugs @chapter Limitations and Known Bugs @cindex Limitations and Known Bugs -@comment * Limitations and Known Bugs -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @itemize @bullet @item Re-indenting large regions or expressions can be slow. +@ignore @item The index menu does not work on my XEmacs installation (don't know why). +@end ignore @end itemize -@node Mailing Lists and Submitting Bug Reports, Concept Index, Limitations and Known Bugs, Top -@comment node-name, next, previous, up +@node Mailing Lists and Submitting Bug Reports @chapter Mailing Lists and Submitting Bug Reports @cindex Mailing Lists and Submitting Bug Reports -@comment * Mailing Lists and Submitting Bug Reports @kindex C-c C-b @findex vhdl-submit-bug-report @@ -1208,35 +966,32 @@ expose the bug. Be especially sure to include any code that appears @emph{before} your bug example. -For other help or suggestions, send a message to . +For other help or suggestions, send a message to @email{reto@@gnu.org}. -Send an add message to to get on the +Send an add message to @email{reto@@gnu.org} to get on the @code{vhdl-mode-victims} beta testers list where beta releases of VHDL Mode are posted. Note that you shouldn't expect beta releases to be as stable as public releases. There is also an announce only list where the latest public releases of VHDL Mode are posted. Send an add message to - to be added to this list. - -@c !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Concept Index, Command Index, Mailing Lists and Submitting Bug Reports, Top -@comment node-name, next, previous, up +@email{reto@@gnu.org} to be added to this list. + + +@node GNU Free Documentation License +@appendix GNU Free Documentation License +@include doclicense.texi + + +@node Concept Index @unnumbered Concept Index -@c !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @printindex cp -@c !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Command Index, Key Index, Concept Index, Top -@comment node-name, next, previous, up +@node Command Index @unnumbered Command Index -@c !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -@ifinfo - -@end ifinfo + Since all VHDL Mode commands are prepended with the string @samp{vhdl-}, each appears under its @code{vhdl-} name and its @code{ (vhdl-)} name. @@ -1246,24 +1001,15 @@ @printindex fn -@c !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Key Index, Variable Index, Command Index, Top -@comment node-name, next, previous, up +@node Key Index @unnumbered Key Index -@c !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @printindex ky -@c !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Variable Index, , Key Index, Top -@comment node-name, next, previous, up +@node Variable Index @unnumbered Variable Index -@c !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -@ifinfo - -@end ifinfo + Since all VHDL Mode variables are prepended with the string @samp{vhdl-}, each appears under its @code{vhdl-} name and its @code{ (vhdl-)} name. @@ -1271,6 +1017,5 @@ @sp 2 @end iftex @printindex vr -@summarycontents -@contents + @bye ------------------------------------------------------------ revno: 116885 author: Rod Whitby , Reto Zimmermann committer: Glenn Morris branch nick: trunk timestamp: Thu 2014-03-27 14:18:15 -0400 message: * doc/misc/vhdl-mode.texi: New file, imported from upstream vhdl-mode. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2014-03-26 15:57:13 +0000 +++ doc/misc/ChangeLog 2014-03-27 18:18:15 +0000 @@ -1,3 +1,8 @@ +2014-03-27 Reto Zimmermann + Rod Whitby + + * vhdl-mode.texi: New file, imported from upstream vhdl-mode. + 2014-03-26 Paul Eggert * texinfo.tex: Update from gnulib. === added file 'doc/misc/vhdl-mode.texi' --- doc/misc/vhdl-mode.texi 1970-01-01 00:00:00 +0000 +++ doc/misc/vhdl-mode.texi 2014-03-27 18:18:15 +0000 @@ -0,0 +1,1276 @@ +\input texinfo @c -*- texinfo -*- + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@comment %**start of header (This is for running Texinfo on a region) +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@setfilename vhdl-mode.info +@settitle VHDL Mode Version 3 Documentation +@footnotestyle end + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@comment @setchapternewpage odd !! we don't want blank pages !! +@comment %**end of header (This is for running Texinfo on a region) +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@comment +@comment texinfo manual for @file{vhdl-mode.el} version 3 +@comment manual version: 3.1 +@comment adapted from the VHDL Mode texinfo manual version 2 by +@comment Rodney J. Whitby +@comment adapted from the CC Mode texinfo manual by Barry A. Warsaw +@comment +@comment +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@comment The following line inserts the copyright notice +@comment into the Info file. +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@ifinfo +Copyright @copyright{} 1997 - 2002 Reto Zimmermann +Copyright @copyright{} 1995 - 1997 Rodney J. Whitby +@end ifinfo + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@comment !!!The titlepage section does not appear in the Info file.!!! +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@titlepage +@sp 10 + + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@comment The title is printed in a large font. +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@center @titlefont{VHDL Mode Version 3} +@sp 2 +@center A GNU Emacs mode for editing VHDL code. +@center (manual revision: 3.1) +@sp 2 +@center Reto Zimmermann +@center @code{Reto.Zimmermann@@iaeth.ch} +@center Rod Whitby +@center @code{rwhitby@@geocities.com} + + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@comment The following two commands start the copyright page +@comment for the printed manual. This will not appear in the Info file. +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@page +@vskip 0pt plus 1filll +Copyright @copyright{} 1997 Reto Zimmermann +Copyright @copyright{} 1995 - 1997 Rodney J. Whitby +@end titlepage + + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@comment The Top node contains the master menu for the Info file. +@comment This appears only in the Info file, not the printed manual. +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@node Top, Introduction, (dir), (dir) +@comment node-name, next, previous, up + + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@menu +* Introduction:: +* Getting Connected:: +* New Indentation Engine:: +* Customizing Indentation:: +* Syntactic Symbols:: +* Indentation Commands:: +* Frequently Asked Questions:: +* Getting the latest VHDL Mode release:: +* Sample .emacs File:: +* Requirements:: +* Limitations and Known Bugs:: +* Mailing Lists and Submitting Bug Reports:: +* Concept Index:: +* Command Index:: Command Index +* Key Index:: Key Index +* Variable Index:: Variable Index +@end menu + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@node Introduction, Getting Connected, Top, Top +@comment node-name, next, previous, up +@chapter Introduction +@cindex Introduction + +Welcome to VHDL Mode version 3. This is a GNU Emacs mode for editing +files containing VHDL code. + +This manual will describe the following: + +@itemize @bullet +@item +How to get started using VHDL Mode. + +@item +How the indentation engine works. + +@item +How to customize the indentation engine. + +@end itemize + +@findex vhdl-version +The major version number was incremented to 3 with the addition of +many new features for editing VHDL code to the new indentation engine, +which was introduced in major version 2. To find the minor revision +number of this release, use @kbd{M-x vhdl-version RET}. + +A special word of thanks goes to Rod Whitby, who wrote the +VHDL Mode indentation engine, and to Barry Warsaw, who wrote +the CC Mode indentation engine that formed the basis +thereof. Their manuals were also the basis for this manual. + +This manual is not very up-to-date. It basically contains the +indentation machine documentation by Rod Whitby with only minor +adaptions. A short documentation of the entire VHDL Mode is available +within the mode itself by typing @kbd{C-c C-h}. Also, all commands and +customization of most variables are available through the menu, which +makes everything highly self-explaining. + + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@node Getting Connected, New Indentation Engine, Introduction, Top +@comment node-name, next, previous, up +@chapter Getting Connected +@cindex Getting Connected + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +VHDL Mode works well under GNU Emacs 20 and XEmacs 19.15 and higher. +GNU Emacs 19 is not supported anymore since several new features of +Emacs 20 are used in this VHDL Mode version (you can download VHDL +Mode version 1.10 for Emacs 19). + +@cindex .emacs file +The first thing you will want to do is put @file{vhdl-mode.el} somewhere +on your @code{load-path} so Emacs can find it. Do a @kbd{C-h v +load-path RET} to see all the directories Emacs looks at when loading a +file. If none of these directories are appropriate, create a new +directory and add it to your @code{load-path}: + +@noindent +@emph{[in the shell]} +@example +@group + +% cd +% mkdir mylisp +% mv vhdl-mode.el mylisp +% cd mylisp + +@end group +@end example + +@noindent +@emph{[in your .emacs file add]} +@example + +(setq load-path (cons "~/mylisp" load-path)) + +@end example + +@cindex byte compile +Next you want to @dfn{byte compile} @file{vhdl-mode.el}. The mode uses a +lot of macros so if you don't byte compile it, things will be unbearably +slow. @emph{You can ignore all byte-compiler warnings!} They are the +result of the supporting different versions of Emacs, and none of the +warnings have any effect on operation. Let me say this again: +@strong{You really can ignore all byte-compiler warnings!} + +Here's what to do to byte-compile the file [in emacs]: +@example + +M-x byte-compile-file RET ~/mylisp/vhdl-mode.el RET + +@end example + +Now add the following autoloads to your @file{.emacs} file so that +@code{vhdl-mode} gets loaded at the right time: +@example + +(autoload 'vhdl-mode "vhdl-mode" "VHDL Editing Mode" t) + +@end example + +Alternatively, if you want to make sure VHDL Mode is loaded when +Emacs starts up, you could use this line instead of the autoload above: +@example + +(require 'vhdl-mode) + +@end example + +Next, you will want to set up Emacs so that it edits VHDL files in +VHDL Mode. All users should add the following to their +@file{.emacs} file. Note that this assumes you'll be editing @code{.vhd} +and files as VHDL. YMMV: +@example +@group + +(setq auto-mode-alist + (append + '(("\\.vhd$" . vhdl-mode) + ) auto-mode-alist)) + +@end group +@end example + +That's all you need -- I know, I know, it sounds like a lot @code{:-)}, +but after you've done all this, you should only need to quit and restart +Emacs. The next time you visit a VHDL file you should be using +VHDL Mode. You can check this easily by hitting @kbd{M-x +vhdl-version RET} in the VHDL Mode buffer. You should see this +message in the echo area: +@example + +Using VHDL Mode version 3.@var{XX} + +@end example + +@noindent +where @var{XX} will be some minor revision number. + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@node New Indentation Engine, Indentation Commands, Getting Connected, Top +@comment node-name, next, previous, up + +@chapter New Indentation Engine +@cindex New Indentation Engine + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +VHDL Mode has a new indentation engine, providing a simplified, yet +flexible and general mechanism for customizing indentation. It breaks +indentation calculation into two steps. First for the line of code being +indented, VHDL Mode analyzes what kind of language construct it's +looking at, then it applies user defined offsets to the current line +based on this analysis. + +This section will briefly cover how indentation is calculated in +VHDL Mode. It is important to understand the indentation model +being used so that you will know how to customize VHDL Mode for +your personal coding style. + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@menu +* Syntactic Analysis:: Step 1 -- Syntactic Analysis +* Indentation Calculation:: Step 2 -- Indentation Calculation +@end menu +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node Syntactic Analysis, Indentation Calculation, , New Indentation Engine +@comment node-name, next, previous, up +@section Syntactic Analysis +@cindex Syntactic Analysis +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@vindex vhdl-offsets-alist +@vindex offsets-alist (vhdl-) +@cindex relative buffer position +@cindex syntactic symbol +@cindex syntactic component +@cindex syntactic component list +@cindex relative buffer position +The first thing VHDL Mode does when indenting a line of code, is +to analyze the line, determining the @dfn{syntactic component list} of +the construct on that line. A @dfn{syntactic component} consists of a +pair of information (in lisp parlance, a @emph{cons cell}), where the +first part is a @dfn{syntactic symbol}, and the second part is a +@dfn{relative buffer position}. Syntactic symbols describe elements of +VHDL code, e.g. @code{statement}, @code{comment}, @code{block-open}, +@code{block-close}, etc. @xref{Syntactic Symbols}, for a complete list +of currently recognized syntactic symbols and their semantics. Also, +the variable @code{vhdl-offsets-alist} contains the list of currently +supported syntactic symbols. + +Conceptually, a line of VHDL code is always indented relative to the +indentation of some line higher up in the buffer. This is represented +by the relative buffer position in the syntactic component. + +It might help to see an example. Suppose we had the following code as +the only thing in a VHDL Mode buffer @footnote{The line numbers +in this and future examples don't actually appear in the buffer.}: +@example +@group + + 1: inverter : process + 2: begin + 3: q <= not d; + 4: wait on d; + 5: end inverter; + +@end group +@end example + +@kindex C-c C-x +@findex vhdl-show-syntactic-information +@findex show-syntactic-information (vhdl-) +We can use the command @kbd{C-c C-x} +(@code{vhdl-show-syntactic-information}) to simply report what the +syntactic analysis is for the current line. Running this command on +line 4 of example 1, we'd see in the echo area: +@example + +((statement . 28)) + +@end example + +This tells us that the line is a statement and it is indented relative +to buffer position 28, which happens to be the @samp{q} on line 3. If +you were to move point to line 3 and hit @kbd{C-c C-x}, you would see: +@example + +((statement-block-intro . 20)) + +@end example + +This indicates that line 3 is the first statement in a block, and is +indented relative to buffer position 20, which is the @samp{b} in the +@code{begin} keyword on line 2. + +@cindex comment only line +Syntactic component lists can contain more than one component, and +individual syntactic compenents need not have relative buffer positions. +The most common example of this is a line that contains a @dfn{comment +only line}. +@example +@group + +%%% TBD %%% + +@end group +@end example + +@noindent +Hitting @kbd{C-c C-x} on line 3 of the example gives us: +@example + +((comment-intro) (block-intro . 46)) + +@end example + +@noindent +so you can see that the syntactic component list contains two syntactic +components. Also notice that the first component, +@samp{(comment-intro)} has no relative buffer position. + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node Indentation Calculation, , Syntactic Analysis, New Indentation Engine +@comment node-name, next, previous, up +@section Indentation Calculation +@cindex Indentation Calculation +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@vindex vhdl-offsets-alist +@vindex offsets-alist (vhdl-) +Indentation for the current line is calculated using the syntactic +component list derived in step 1 above (see @ref{Syntactic +Analysis}). Each component contributes to the final total indentation +of the line in two ways. + +First, the syntactic symbols are looked up in the @code{vhdl-offsets-alist} +variable, which is an association list of syntactic symbols and the +offsets to apply for those symbols. These offsets are added to the +running total. + +Second, if the component has a relative buffer position, VHDL Mode +adds the column number of that position to the running total. By adding +up the offsets and columns for every syntactic component on the list, +the final total indentation for the current line is computed. + +Let's use our code example above to see how this works. Here is our +example again. +@example +@group + + 1: inverter : process + 2: begin + 3: q <= not d; + 4: wait on d; + 5: end inverter; + +@end group +@end example + +@kindex TAB +Let's say point is on line 3 and we hit the @key{TAB} key to re-indent +the line. Remember that the syntactic component list for that +line is: +@example + +((statement-block-intro . 20)) + +@end example + +@noindent +VHDL Mode looks up @code{statement-block-intro} in the +@code{vhdl-offsets-alist} variable. Let's say it finds the value @samp{2}; +it adds this to the running total (initialized to zero), yielding a +running total indentation of 2 spaces. + +Next VHDL Mode goes to buffer position 20 and asks for the +current column. Since the @code{begin} keyword at buffer position 20 is +in column zero, it adds @samp{0} to the running total. Since there is +only one syntactic component on the list for this line, indentation +calculation is complete, and the total indentation for the line is 2 +spaces. +Simple, huh? + +Actually, the mode usually just does The Right Thing without you having +to think about it in this much detail. But when customizing +indentation, it's helpful to understand the general indentation model +being used. + +@vindex vhdl-echo-syntactic-information-p +@vindex echo-syntactic-information-p (vhdl-) +@cindex TAB +To help you configure VHDL Mode, you can set the variable +@code{vhdl-echo-syntactic-information-p} to non-@code{nil} so that the +syntactic component list and calculated offset will always be echoed in +the minibuffer when you hit @kbd{TAB}. + + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node Indentation Commands, Customizing Indentation, New Indentation Engine, Top +@comment node-name, next, previous, up + +@chapter Indentation Commands +@cindex Indentation Commands +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@strong{} + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node Customizing Indentation, Syntactic Symbols, Indentation Commands, Top +@comment node-name, next, previous, up + +@chapter Customizing Indentation +@cindex Customizing Indentation +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@cindex vhdl-set-offset +@cindex set-offset (vhdl-) +The @code{vhdl-offsets-alist} variable is where you customize all your +indentations. You simply need to decide what additional offset you want +to add for every syntactic symbol. You can use the command @kbd{C-c +O} (@code{vhdl-set-offset}) as the way to set offsets, both +interactively and from your mode hook. Also, you can set up +@emph{styles} of indentation. Most likely, you'll find one of the +pre-defined styles will suit your needs, but if not, this section will +describe how to set up basic editing configurations. @xref{Styles} for +an explanation of how to set up named styles. + +@cindex vhdl-basic-offset +@cindex basic-offset (vhdl-) +As mentioned previously, the variable @code{vhdl-offsets-alist} is an +association list between syntactic symbols and the offsets to be applied +for those symbols. In fact, these offset values can be an integer, a +function or variable name, or one of the following symbols: @code{+}, +@code{-}, @code{++}, @code{--}, @code{*}, or @code{/}. The symbol +values have the following meanings: + +@itemize @bullet + +@item +@code{+} -- 1 x @code{vhdl-basic-offset} +@item +@code{-} -- -1 x @code{vhdl-basic-offset} +@item +@code{++} -- 2 x @code{vhdl-basic-offset} +@item +@code{--} -- -2 x @code{vhdl-basic-offset} +@item +@code{*} -- 0.5 x @code{vhdl-basic-offset} +@item +@code{/} -- -0.5 x @code{vhdl-basic-offset} + +@end itemize + +@noindent +So, for example, because most of the default offsets are defined in +terms of @code{+}, @code{-}, and @code{0}, if you like the general +indentation style, but you use 2 spaces instead of 4 spaces per level, +you can probably achieve your style just by changing +@code{vhdl-basic-offset} like so (in your @file{.emacs} file): +@example + +(setq vhdl-basic-offset 2) + +@end example + +To change indentation styles more radically, you will want to change the +value associated with the syntactic symbols in the +@code{vhdl-offsets-alist} variable. First, I'll show you how to do that +interactively, then I'll describe how to make changes to your +@file{.emacs} file so that your changes are more permanent. + +@menu +* Interactive Customization:: +* Permanent Customization:: +* Styles:: +* Advanced Customizations:: +@end menu + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node Interactive Customization, Permanent Customization, , Customizing Indentation +@comment node-name, next, previous, up + +@section Interactive Customization +@cindex Interactive Customization +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +As an example of how to customize indentation, let's change the +style of the example above from: +@example +@group + + 1: inverter : process + 2: begin + 3: q <= not d; + 4: wait on d; + 5: end inverter; + +@end group +@end example +@noindent +to: +@example +@group + + 1: inverter : process + 2: begin + 3: q <= not d; + 4: wait on d; + 5: end inverter; + +@end group +@end example + +In other words, we want to change the indentation of the statments +inside the inverter process. Notice that the construct we want to +change starts on line 3. To change the indentation of a line, we need +to see which syntactic component affect the offset calculations for that +line. Hitting @kbd{C-c C-x} on line 3 yields: +@example + +((statement-block-intro . 20)) + +@end example + +@findex vhdl-set-offset +@findex set-offset (vhdl-) +@kindex C-c O +@noindent +So we know that to change the offset of the first signal assignment, we need to +change the indentation for the @code{statement-block-intro} syntactic +symbol. To do this interactively, just hit @kbd{C-c O} +(@code{vhdl-set-offset}). This prompts you for the syntactic symbol to +change, providing a reasonable default. In this case, the default is +@code{statement-block-intro}, which is just the syntactic symbol we want to +change! + +After you hit return, VHDL Mode will then prompt you for the new +offset value, with the old value as the default. The default in this +case is @samp{+}, so hit backspace to delete the @samp{+}, then hit +@samp{++} and @kbd{RET}. This will associate an offset of twice the +basic indent with the syntactic symbol @code{statement-block-intro} in +the @code{vhdl-offsets-alist} variable. + +@findex vhdl-indent-defun +@findex indent-defun (vhdl-) +To check your changes quickly, just enter @kbd{M-x vhdl-indent-defun} to +reindent the entire function. The example should now look like: +@example +@group + + 1: inverter : process + 2: begin + 3: q <= not d; + 4: wait on d; + 5: end inverter; + +@end group +@end example + +Notice how just changing the offset on line 3 is all we needed to do. +Since the other affected lines are indented relative to line 3, they are +automatically indented the way you'd expect. For more complicated +examples, this may not always work. The general approach to take is to +always start adjusting offsets for lines higher up in the file, then +re-indent and see if any following lines need further adjustments. + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node Permanent Customization, Styles, Interactive Customization, Customizing Indentation +@comment node-name, next, previous, up + +@section Permanent Indentation +@cindex Permanent Indentation +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@vindex vhdl-mode-hook +@cindex hooks +To make this change permanent, you need to add some lisp code to your +@file{.emacs} file. VHDL Mode provides a @code{vhdl-mode-hook} +that you can use to customize your language editing styles. This hook +gets run as the last thing when you enter VHDL Mode. + +Here's a simplified example of what you can add to your @file{.emacs} +file to make the changes described in the previous section +(@ref{Interactive Customization}) more permanent. See the Emacs +manuals for more information on customizing Emacs via hooks. +@xref{Sample .emacs File} for a more complete sample @file{.emacs} file. +@footnote{The use of @code{add-hook} in this example only works for +Emacs 19. Workarounds are available if you are using Emacs 18, but this +just points out another reason for you to upgrade to Emacs 19! +@code{:-)}} +@example +@group + +(defun my-vhdl-mode-hook () + ;; my customizations for all of vhdl-mode + (vhdl-set-offset 'statement-block-intro '++) + ;; other customizations can go here + ) +(add-hook 'vhdl-mode-hook 'my-vhdl-mode-hook) + +@end group +@end example + +For complex customizations, you will probably want to set up a +@emph{style} that groups all your customizations under a single +name. @xref{Styles} for details. + +The offset value can also be a function, and this is how power users +gain enormous flexibility in customizing indentation. @xref{Advanced +Customizations} for details. + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node Styles, Advanced Customizations, Permanent Customization, Customizing Indentation +@comment node-name, next, previous, up + +@section Styles +@cindex Styles +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +Most people only need to edit code formatted in just a few well-defined +and consistent styles. For example, their organization might impose a +``blessed'' style that all its programmers must conform to. Similarly, +people who work on GNU software will have to use the GNU coding style on +C code. Some shops are more lenient, allowing some variety of coding +styles, and as programmers come and go, there could be a number of +styles in use. For this reason, VHDL Mode makes it convenient for +you to set up logical groupings of customizations called @dfn{styles}, +associate a single name for any particular style, and pretty easily +start editing new or existing code using these styles. This chapter +describes how to set up styles and how to edit your C code using styles. + +@menu +* Built-in Styles:: +* Adding Styles:: +* File Styles:: +@end menu + + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node Built-in Styles, Adding Styles, , Styles +@comment node-name, next, previous, up + +@subsection Built-in Styles +@cindex Built-in Styles +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +If you're lucky, one of VHDL Mode's built-in styles might be just +what you're looking for. Some of the most common VHDL styles are +already built-in. These include: + +@itemize @bullet +@item +@cindex IEEE style +@code{GNU} -- the coding style in the IEEE Language Reference Manual. + +@end itemize + +@findex vhdl-set-style +@findex set-style (vhdl-) +If you'd like to experiment with these built-in styles you can simply +type the following in a VHDL Mode buffer: +@example +@group + +@kbd{M-x vhdl-set-style RET}. + +@end group +@end example +@noindent +You will be prompted for one of the above styles (with completion). +Enter one of the styles and hit @kbd{RET}. Note however that setting a +style in this way does @emph{not} automatically re-indent your file. +For commands that you can use to view the effect of your changes, see +@ref{Indentation Commands}. + +Once you find a built-in style you like, you can make the change +permanent by adding a call to your @file{.emacs} file. Let's say for +example that you want to use the @code{IEEE} style in all your +files. You would add this: +@example +@group + +(defun my-vhdl-mode-hook () + ;; use IEEE style for all VHDL code + (vhdl-set-style "IEEE") + ;; other customizations can go here + ) +(add-hook 'vhdl-mode-hook 'my-vhdl-mode-hook) + +@end group +@end example + +@noindent +@xref{Permanent Customization}. + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node Adding Styles, File Styles, Built-in Styles, Styles +@comment node-name, next, previous, up + +@subsection Adding Styles +@cindex Adding Styles +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@vindex vhdl-style-alist +@vindex style-alist (vhdl-) +@findex vhdl-add-style +@findex add-style (vhdl-) +If none of the built-in styles is appropriate, you'll probably want to +add a new style definition. Styles are kept in the @code{vhdl-style-alist} +variable, but you probably won't want to modify this variable directly. +VHDL Mode provides a function, called @code{vhdl-add-style}, that you +can use to easily add new styles or update existing styles. This +function takes two arguments, a @var{stylename} string, and an +association list @var{description} of style customizations. If +@var{stylename} is not already in @code{vhdl-style-alist}, the new style is +added, otherwise the style already associated with @var{stylename} is +changed to the new @var{description}. This function also takes an +optional third argument, which if non-@code{nil}, automatically +institutes the new style in the current buffer. + +The sample @file{.emacs} file provides a concrete example of how a new +style can be added and automatically set. @xref{Sample .emacs File}. + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node File Styles, , Adding Styles, Styles +@comment node-name, next, previous, up + +@subsection File Styles +@cindex File Styles +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@cindex local variables +The Emacs manual describes how you can customize certain variables on a +per-file basis by including a @dfn{Local Variable} block at the end of +the file. So far, you've only seen a functional interface to +VHDL Mode, which is highly inconvenient for use in a Local Variable +block. VHDL Mode provides two variables that make it easier for +you to customize your style on a per-file basis. + +@vindex vhdl-file-style +@vindex file-style (vhdl-) +@vindex vhdl-file-offsets +@vindex file-offsets (vhdl-) + +The variable @code{vhdl-file-style} can be set to a style name string as +described in @ref{Built-in Styles}. When the file is visited, +VHDL Mode will automatically set the file's style to this style +using @code{vhdl-set-style}. + +@vindex vhdl-offsets-alist +@vindex offsets-alist (vhdl-) +@findex vhdl-set-offset +@findex set-offset (vhdl-) +Another variable, @code{vhdl-file-offsets}, takes an association list +similar to what is allowed in @code{vhdl-offsets-alist}. When the file is +visited, VHDL Mode will automatically institute these offets using +@code{vhdl-set-offset}. @xref{Customizing Indentation}. + +Note that file style settings (i.e. @code{vhdl-file-style}) are applied +before file offset settings (i.e. @code{vhdl-file-offsets}). + + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node Advanced Customizations, , Styles, Customizing Indentation +@comment node-name, next, previous, up + +@section Advanced Customizations +@cindex Advanced Customizations +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@vindex vhdl-style-alist +@vindex style-alist (vhdl-) +@vindex vhdl-basic-offset +@vindex basic-offset (vhdl-) +For most users, VHDL Mode will support their coding styles with +very little need for customizations. Usually, one of the standard +styles defined in @code{vhdl-style-alist} will do the trick. Sometimes, +one of the syntactic symbol offsets will need to be tweeked slightly, or +perhaps @code{vhdl-basic-offset} will need to be changed. However, some +styles require a more advanced ability for customization, and one of the +real strengths of VHDL Mode is that the syntactic analysis model +provides a very flexible framework for customizing indentation. This +allows you to perform special indentation calculations for situations +not handled by the mode directly. + +@menu +* Custom Indentation Functions:: +* Other Special Indentations:: +@end menu + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node Custom Indentation Functions, Other Special Indentations, , Advanced Customizations +@comment node-name, next, previous, up + +@subsection Custom Indentation Functions +@cindex Custom Indentation Functions +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@cindex custom indentation functions +One of the most common ways to customize VHDL Mode is by writing +@dfn{custom indentation functions} and associating them with specific +syntactic symbols (see @ref{Syntactic Symbols}). VHDL Mode itself +uses custom indentation functions to provide more sophisticated +indentation, for example when lining up selected signal assignments: +@example +@group + +%%% TBD %%% + +@end group +@end example + +In this example, the @code{statement-cont} syntactic symbol has an +offset of @code{+}, and @code{vhdl-basic-offset} is 2, so lines 4 +through 6 are simply indented two spaces to the right of line 3. But +perhaps we'd like VHDL Mode to be a little more intelligent so +that it offsets the waveform descriptions relative to the signal +assignment operator in line 3. To do this, we have to write a custom +indentation function which finds the column of signal assignment +operator on the first line of the statement. Here is the lisp code +(from the @file{vhdl-mode.el} source file) that implements this: +@example +@group + +(defun vhdl-lineup-statement-cont (langelem) + ;; line up statement-cont after the assignment operator + (save-excursion + (let* ((relpos (cdr langelem)) + (assignp (save-excursion + (goto-char (vhdl-point 'boi)) + (and (re-search-forward "\\(<\\|:\\)=" + (vhdl-point 'eol) t) + (- (point) (vhdl-point 'boi))))) + (curcol (progn + (goto-char relpos) + (current-column))) + foundp) + (while (and (not foundp) + (< (point) (vhdl-point 'eol))) + (re-search-forward "\\(<\\|:\\)=\\|(" (vhdl-point 'eol) 'move) + (if (vhdl-in-literal (cdr langelem)) + (forward-char) + (if (= (preceding-char) ?\() + ;; skip over any parenthesized expressions + (goto-char (min (vhdl-point 'eol) + (scan-lists (point) 1 1))) + ;; found an assignment operator (not at eol) + (setq foundp (not (looking-at "\\s-*$")))))) + (if (not foundp) + ;; there's no assignment operator on the line + vhdl-basic-offset + ;; calculate indentation column after assign and ws, unless + ;; our line contains an assignment operator + (if (not assignp) + (progn + (forward-char) + (skip-chars-forward " \t") + (setq assignp 0))) + (- (current-column) assignp curcol)) + ))) + +@end group +@end example +@noindent +Custom indent functions take a single argument, which is a syntactic +component cons cell (see @ref{Syntactic Analysis}). The +function returns an integer offset value that will be added to the +running total indentation for the lne. Note that what actually gets +returned is the difference between the column that the signal assignment +operator is on, and the column of the buffer relative position passed in +the function's argument. Remember that VHDL Mode automatically +adds in the column of the component's relative buffer position and we +don't want that value added into the final total twice. + +@cindex statement-cont syntactic symbol +@findex vhdl-lineup-statement-cont +@findex lineup-statement-cont (vhdl-) +Now, to associate the function @code{vhdl-lineup-statement-cont} with the +@code{statement-cont} syntactic symbol, we can add something like the +following to our @code{vhdl-mode-hook}: +@example + +(vhdl-set-offset 'statement-cont 'vhdl-lineup-statement-cont) + +@end example + +@findex vhdl-indent-defun +Now the function looks like this after re-indenting (using @kbd{M-x +vhdl-indent-defun}): +@example +@group + +%%% TBD %%% + +@end group +@end example + +@vindex vhdl-offsets-alist +@vindex offsets-alist (vhdl-) +Custom indentation functions can be as simple or as complex as you like, +and any syntactic symbol that appears in @code{vhdl-offsets-alist} can have +a custom indentation function associated with it. Note however that +using many custom indentation functions may have a performance impact on +VHDL Mode. + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node Other Special Indentations, , Custom Indentation Functions, Advanced Customizations +@comment node-name, next, previous, up + +@subsection Other Special Indentations +@cindex Other Special Indentations +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@vindex vhdl-special-indent-hook +@vindex special-indent-hook (vhdl-) +One other variable is available for you to customize VHDL Mode: +@code{vhdl-special-indent-hook}. This is a standard hook variable that +is called after every line is indented by VHDL Mode. You can use +it to do any special indentation or line adjustments your style +dictates, such as adding extra indentation to the port map clause in a +component instantiation, etc. Note however, that you should not change +@code{point} or @code{mark} inside your @code{vhdl-special-indent-hook} +functions. + + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node Syntactic Symbols, Frequently Asked Questions, Customizing Indentation, Top +@comment node-name, next, previous, up + +@chapter Syntactic Symbols +@cindex Syntactic Symbols +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@vindex vhdl-offsets-alist +The complete list of recognized syntactic symbols is described in the +@code{vhdl-offsets-alist} variable. This chapter will provide some +examples to help clarify these symbols. + +@cindex -open syntactic symbols +@cindex -close syntactic symbols +Most syntactic symbol names follow a general naming convention. When a +line begins with a @code{begin} or @code{end} keyword, the syntactic +symbol will contain the suffix @code{-open} or @code{-close} +respectively. + +@cindex -intro syntactic symbols +@cindex -cont syntactic symbols +@cindex -block-intro syntactic symbols +Usually, a distinction is made between the first line that introduces a +construct and lines that continue a construct, and the syntactic symbols +that represent these lines will contain the suffix @code{-intro} or +@code{-cont} respectively. As a sub-classification of this scheme, a +line which is the first of a particular block construct will contain the +suffix @code{-block-intro}. + +@strong{ include the name and a brief example of every syntactic +symbol currently recognized} + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node Frequently Asked Questions, Getting the latest VHDL Mode release, Syntactic Symbols, Top +@comment node-name, next, previous, up + +@chapter Frequently Asked Questions +@cindex Frequently Asked Questions +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@kindex C-x h +@kindex ESC C-\ +@kindex ESC C-q +@kindex ESC C-u +@kindex RET +@kindex LFD +@findex newline-and-indent +@quotation + +@strong{Q.} @emph{How do I re-indent the whole file?} + +@strong{A.} Visit the file and hit @kbd{C-x h} to mark the whole +buffer. Then hit @kbd{@key{ESC} C-\} to re-indent the entire region +which you've just marked. Or just enter @kbd{M-x vhdl-indent-buffer}. +@sp 2 + +@strong{Q.} @emph{How do I re-indent the entire function?} + +@strong{A.} Hit @kbd{@key{ESC} C-h} to mark the entire function. Then +hit @kbd{@key{ESC} C-\} to re-indent the entire region which you've just +marked. +@sp 2 + +@strong{Q.} @emph{How do I re-indent the current block?} + +@strong{A.} First move to the brace which opens the block with +@kbd{@key{ESC} C-u}, then re-indent that expression with +@kbd{@key{ESC} C-q}. +@sp 2 + +@strong{Q.} @emph{How do I re-indent the current statement?} + +@strong{A.} First move to the beginning of the statement with +@kbd{@key{ESC} a}, then re-indent that expression with @kbd{@key{ESC} +C-q}. +@sp 2 + +@strong{Q.} @emph{Why doesn't the @key{RET} key indent the line to +where the new text should go after inserting the newline?} + +@strong{A.} Emacs' convention is that @key{RET} just adds a newline, +and that @key{LFD} adds a newline and indents it. You can make +@key{RET} do this too by adding this to your +@code{vhdl-mode-hook} (see the sample @file{.emacs} file +@ref{Sample .emacs File}): +@example + +(define-key vhdl-mode-map "\C-m" 'newline-and-indent) + +@end example + +This is a very common question. @code{:-)} If you want this to be the +default behavior, don't lobby me, lobby RMS! +@sp 2 + +@strong{Q.} @emph{I put @code{(vhdl-set-offset 'statement-cont 0)} +in my @file{.emacs} file but I get an error saying that +@code{vhdl-set-offset}'s function definition is void.} + +@strong{A.} This means that VHDL Mode wasn't loaded into your +Emacs session by the time the @code{vhdl-set-offset} call was reached, +mostly likely because VHDL Mode is being autoloaded. Instead +of putting the @code{vhdl-set-offset} line in your top-level +@file{.emacs} file, put it in your @code{vhdl-mode-hook}, or +simply add the following to the top of your @file{.emacs} file: +@example + +(require 'vhdl-mode) + +@end example + +See the sample @file{.emacs} file @ref{Sample .emacs File} for +details. + +@end quotation + + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node Getting the latest VHDL Mode release, Sample .emacs File, Frequently Asked Questions, Top +@comment node-name, next, previous, up + +@chapter Getting the latest VHDL Mode release +@cindex Getting the latest VHDL Mode release +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +The best way to be sure you always have the latest VHDL Mode release +is to join the @code{vhdl-mode-announce} mailing list. If you are a +brave soul, and wish to participate in beta testing of new releases of +VHDL Mode, you may also join the @code{vhdl-mode-victims} mailing +list. Send email to the maintainer to join +either of these lists. + +The official Emacs VHDL Mode Home Page can be found at +. + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node Sample .emacs File, Requirements, Getting the latest VHDL Mode release, Top +@comment node-name, next, previous, up + +@chapter Sample @file{.emacs} file +@cindex Sample @file{.emacs} file +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +Most customizations can be done using the `Customize' entry in the +VHDL Mode menu, which requires no editing of the .emacs file. +If you want to customize indentation, here you go: + +@example +;; Here's a sample .emacs file that might help you along the way. Just +;; copy this region and paste it into your .emacs file. You may want to +;; change some of the actual values. + +(defconst my-vhdl-style + '((vhdl-tab-always-indent . t) + (vhdl-comment-only-line-offset . 4) + (vhdl-offsets-alist . ((arglist-close . vhdl-lineup-arglist) + (statement-cont . 0) + (case-alternative . 4) + (block-open . 0))) + (vhdl-echo-syntactic-information-p . t) + ) + "My VHDL Programming Style") + +;; Customizations for vhdl-mode +(defun my-vhdl-mode-hook () + ;; add my personal style and set it for the current buffer + (vhdl-add-style "PERSONAL" my-vhdl-style t) + ;; offset customizations not in my-vhdl-style + (vhdl-set-offset 'statement-case-intro '++) + ;; other customizations + (setq tab-width 8 + ;; this will make sure spaces are used instead of tabs + indent-tabs-mode nil) + ;; keybindings for VHDL are put in vhdl-mode-map + (define-key vhdl-mode-map "\C-m" 'newline-and-indent) + ) + +;; the following only works in Emacs 19 +;; Emacs 18ers can use (setq vhdl-mode-hook 'my-vhdl-mode-hook) +(add-hook 'vhdl-mode-hook 'my-vhdl-mode-hook) +@end example + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node Requirements, Limitations and Known Bugs, Sample .emacs File, Top +@comment node-name, next, previous, up +@chapter Requirements +@cindex Requirements +@comment * Requirements +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +All required files are distributed with GNU Emacs 20 and XEmacs 19.15. + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node Limitations and Known Bugs, Mailing Lists and Submitting Bug Reports, Requirements, Top +@comment node-name, next, previous, up +@chapter Limitations and Known Bugs +@cindex Limitations and Known Bugs +@comment * Limitations and Known Bugs +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@itemize @bullet +@item +Re-indenting large regions or expressions can be slow. + +@item +The index menu does not work on my XEmacs installation (don't know why). + +@end itemize + +@node Mailing Lists and Submitting Bug Reports, Concept Index, Limitations and Known Bugs, Top +@comment node-name, next, previous, up +@chapter Mailing Lists and Submitting Bug Reports +@cindex Mailing Lists and Submitting Bug Reports +@comment * Mailing Lists and Submitting Bug Reports + +@kindex C-c C-b +@findex vhdl-submit-bug-report +@findex submit-bug-report (vhdl-) +@cindex beta testers mailing list +@cindex announcement mailing list +To report bugs, use the @kbd{C-c C-b} (@code{vhdl-submit-bug-report}) +command. This provides vital information I need to reproduce your +problem. Make sure you include a concise, but complete code example. +Please try to boil your example down to just the essential code needed +to reproduce the problem, and include an exact recipe of steps needed to +expose the bug. Be especially sure to include any code that appears +@emph{before} your bug example. + +For other help or suggestions, send a message to . + +Send an add message to to get on the +@code{vhdl-mode-victims} beta testers list where beta releases of +VHDL Mode are posted. Note that you shouldn't expect beta +releases to be as stable as public releases. + +There is also an announce only list where the latest public releases +of VHDL Mode are posted. Send an add message to + to be added to this list. + +@c !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node Concept Index, Command Index, Mailing Lists and Submitting Bug Reports, Top +@comment node-name, next, previous, up +@unnumbered Concept Index +@c !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@printindex cp + + +@c !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node Command Index, Key Index, Concept Index, Top +@comment node-name, next, previous, up +@unnumbered Command Index +@c !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@ifinfo + +@end ifinfo +Since all VHDL Mode commands are prepended with the string +@samp{vhdl-}, each appears under its @code{vhdl-} name and its +@code{ (vhdl-)} name. +@iftex +@sp 2 +@end iftex +@printindex fn + + +@c !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node Key Index, Variable Index, Command Index, Top +@comment node-name, next, previous, up +@unnumbered Key Index +@c !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@printindex ky + + +@c !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node Variable Index, , Key Index, Top +@comment node-name, next, previous, up +@unnumbered Variable Index +@c !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@ifinfo + +@end ifinfo +Since all VHDL Mode variables are prepended with the string +@samp{vhdl-}, each appears under its @code{vhdl-} name and its +@code{ (vhdl-)} name. +@iftex +@sp 2 +@end iftex +@printindex vr +@summarycontents +@contents +@bye ------------------------------------------------------------ revno: 116884 [merge] committer: Juanma Barranquero branch nick: trunk timestamp: Thu 2014-03-27 18:34:22 +0100 message: Merge from emacs-24; up to r116871 diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-03-26 21:01:47 +0000 +++ lisp/ChangeLog 2014-03-27 17:34:22 +0000 @@ -1,3 +1,20 @@ +2014-03-27 Dmitry Gutov + + * progmodes/ruby-mode.el (ruby-font-lock-keywords): Highlight + special globals with font-lock-builtin-face. (Bug#17057) + + * progmodes/ruby-mode.el (ruby-syntax-propertize-function): + Don't propertize `?' or `!' as symbol constituent when after + colon. (Bug#17097) + +2014-03-27 Juanma Barranquero + + * frameset.el (frameset--restore-frame): Remove workaround for bug#14795 + which is no longer needed and causes trouble in GTK builds (bug#17046). + + * emacs-lisp/package-x.el (package--archive-contents-from-url): + Use url-insert-file-contents; package-handle-response no longer exists. + 2014-03-26 Daniel Colascione * simple.el (process-menu-mode-map): New variable. === modified file 'lisp/emacs-lisp/package-x.el' --- lisp/emacs-lisp/package-x.el 2014-01-01 07:43:34 +0000 +++ lisp/emacs-lisp/package-x.el 2014-03-27 00:20:50 +0000 @@ -114,18 +114,12 @@ (defun package--archive-contents-from-url (archive-url) "Parse archive-contents file at ARCHIVE-URL. Return the file contents, as a string, or nil if unsuccessful." - (ignore-errors - (when archive-url - (let* ((buffer (url-retrieve-synchronously - (concat archive-url "archive-contents")))) - (set-buffer buffer) - (package-handle-response) - (re-search-forward "^$" nil 'move) - (forward-char) - (delete-region (point-min) (point)) - (prog1 (package-read-from-string - (buffer-substring-no-properties (point-min) (point-max))) - (kill-buffer buffer)))))) + (when archive-url + (with-temp-buffer + (ignore-errors + (url-insert-file-contents (concat archive-url "archive-contents")) + (package-read-from-string + (buffer-substring-no-properties (point-min) (point-max))))))) (defun package--archive-contents-from-file () "Parse the archive-contents at `package-archive-upload-base'" === modified file 'lisp/frameset.el' --- lisp/frameset.el 2014-03-26 15:57:13 +0000 +++ lisp/frameset.el 2014-03-27 17:34:22 +0000 @@ -950,15 +950,10 @@ For the meaning of FILTERS and FORCE-ONSCREEN, see `frameset-restore'. Internal use only." (let* ((fullscreen (cdr (assq 'fullscreen parameters))) - (lines (assq 'tool-bar-lines parameters)) (filtered-cfg (frameset-filter-params parameters filters nil)) (display (cdr (assq 'display filtered-cfg))) ;; post-filtering alt-cfg frame) - ;; This works around bug#14795 (or feature#14795, if not a bug :-) - (setq filtered-cfg (assq-delete-all 'tool-bar-lines filtered-cfg)) - (push '(tool-bar-lines . 0) filtered-cfg) - (when fullscreen ;; Currently Emacs has the limitation that it does not record the size ;; and position of a frame before maximizing it, so we cannot save & @@ -1009,8 +1004,7 @@ (not (eq (frame-parameter frame 'visibility) 'icon))) (frameset-move-onscreen frame force-onscreen)) - ;; Let's give the finishing touches (visibility, tool-bar, maximization). - (when lines (push lines alt-cfg)) + ;; Let's give the finishing touches (visibility, maximization). (when alt-cfg (modify-frame-parameters frame alt-cfg)) ;; Now restore window state. (window-state-put window-state (frame-root-window frame) 'safe) === modified file 'lisp/progmodes/ruby-mode.el' --- lisp/progmodes/ruby-mode.el 2014-03-24 08:53:56 +0000 +++ lisp/progmodes/ruby-mode.el 2014-03-27 08:21:15 +0000 @@ -1812,6 +1812,7 @@ ("[!?]" (0 (unless (save-excursion (or (nth 8 (syntax-ppss (match-beginning 0))) + (eq (char-before) ?:) (let (parse-sexp-lookup-properties) (zerop (skip-syntax-backward "w_"))) (memq (preceding-char) '(?@ ?$)))) @@ -2108,13 +2109,28 @@ 1 font-lock-variable-name-face) ;; Keywords that evaluate to certain values. ("\\_<__\\(?:LINE\\|ENCODING\\|FILE\\)__\\_>" - (0 font-lock-variable-name-face)) + (0 font-lock-builtin-face)) ;; Symbols. ("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\|@?\\(\\w\\|_\\)+\\([!?=]\\|\\b_*\\)\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)" 2 font-lock-constant-face) - ;; Variables. - ("\\$[^a-zA-Z \n]" - 0 font-lock-variable-name-face) + ;; Special globals. + (,(concat "\\$\\(?:[:\"!@;,/\\._><\\$?~=*&`'+0-9]\\|-[0adFiIlpvw]\\|" + (regexp-opt '("LOAD_PATH" "LOADED_FEATURES" "PROGRAM_NAME" + "ERROR_INFO" "ERROR_POSITION" + "FS" "FIELD_SEPARATOR" + "OFS" "OUTPUT_FIELD_SEPARATOR" + "RS" "INPUT_RECORD_SEPARATOR" + "ORS" "OUTPUT_RECORD_SEPARATOR" + "NR" "INPUT_LINE_NUMBER" + "LAST_READ_LINE" "DEFAULT_OUTPUT" "DEFAULT_INPUT" + "PID" "PROCESS_ID" "CHILD_STATUS" + "LAST_MATCH_INFO" "IGNORECASE" + "ARGV" "MATCH" "PREMATCH" "POSTMATCH" + "LAST_PAREN_MATCH" "stdin" "stdout" "stderr" + "DEBUG" "FILENAME" "VERBOSE" "SAFE" "CLASSPATH" + "JRUBY_VERSION" "JRUBY_REVISION" "ENV_JAVA")) + "\\_>\\)") + 0 font-lock-builtin-face) ("\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+" 0 font-lock-variable-name-face) ;; Constants. === modified file 'src/ChangeLog' --- src/ChangeLog 2014-03-27 01:17:54 +0000 +++ src/ChangeLog 2014-03-27 17:34:22 +0000 @@ -1,3 +1,15 @@ +2014-03-27 YAMAMOTO Mitsuharu + + * w32term.c (x_draw_image_glyph_string): Fix computation of height + and width of image background when it is displayed with a 'box' + face. (Bug#17115) + +2014-03-27 Paul Eggert + + More backward-compatible fix to char-equal core dump (Bug#17011). + * editfns.c (Fchar_equal): In unibyte buffers, assume values in + range 128-255 are raw bytes. Suggested by Eli Zaretskii. + 2014-03-27 Juanma Barranquero * image.c (init_svg_functions): When loading SVG-related libraries, === modified file 'src/editfns.c' --- src/editfns.c 2014-03-26 05:35:38 +0000 +++ src/editfns.c 2014-03-26 17:55:31 +0000 @@ -4377,13 +4377,23 @@ if (NILP (BVAR (current_buffer, case_fold_search))) return Qnil; - /* FIXME: When enable-multibyte-characters is nil, it's still possible - to manipulate multibyte chars, which means there is a bug for chars - in the range 128-255 as we can't tell whether they are eight-bit - bytes or Latin-1 chars. For now, assume the latter. See Bug#17011. - Also see casefiddle.c's casify_object, which has a similar problem. */ i1 = XFASTINT (c1); i2 = XFASTINT (c2); + + /* FIXME: It is possible to compare multibyte characters even when + the current buffer is unibyte. Unfortunately this is ambiguous + for characters between 128 and 255, as they could be either + eight-bit raw bytes or Latin-1 characters. Assume the former for + now. See Bug#17011, and also see casefiddle.c's casify_object, + which has a similar problem. */ + if (NILP (BVAR (current_buffer, enable_multibyte_characters))) + { + if (SINGLE_BYTE_CHAR_P (i1)) + i1 = UNIBYTE_TO_CHAR (i1); + if (SINGLE_BYTE_CHAR_P (i2)) + i2 = UNIBYTE_TO_CHAR (i2); + } + return (downcase (i1) == downcase (i2) ? Qt : Qnil); } === modified file 'src/w32term.c' --- src/w32term.c 2014-03-26 15:57:13 +0000 +++ src/w32term.c 2014-03-27 17:34:22 +0000 @@ -2085,10 +2085,14 @@ int x, y; int box_line_hwidth = eabs (s->face->box_line_width); int box_line_vwidth = max (s->face->box_line_width, 0); - int height; + int height, width; HBITMAP pixmap = 0; - height = s->height - 2 * box_line_vwidth; + height = s->height; + if (s->slice.y == 0) + height -= box_line_vwidth; + if (s->slice.y + s->slice.height >= s->img->height) + height -= box_line_vwidth; /* Fill background with face under the image. Do it only if row is taller than image or if image has a clip mask to reduce @@ -2101,10 +2105,14 @@ || s->img->pixmap == 0 || s->width != s->background_width) { + width = s->background_width; x = s->x; if (s->first_glyph->left_box_line_p && s->slice.x == 0) - x += box_line_hwidth; + { + x += box_line_hwidth; + width -= box_line_hwidth; + } y = s->y; if (s->slice.y == 0) @@ -2150,7 +2158,7 @@ } else #endif - x_draw_glyph_string_bg_rect (s, x, y, s->background_width, height); + x_draw_glyph_string_bg_rect (s, x, y, width, height); s->background_filled_p = 1; } === modified file 'test/indent/ruby.rb' --- test/indent/ruby.rb 2014-03-21 04:26:39 +0000 +++ test/indent/ruby.rb 2014-03-27 06:53:13 +0000 @@ -148,6 +148,11 @@ ) end +# Bug#17097 +if x == :!= + something +end + # Example from http://www.ruby-doc.org/docs/ProgrammingRuby/html/language.html d = 4 + 5 + # no '\' needed 6 + 7 ------------------------------------------------------------ revno: 116883 committer: Juanma Barranquero branch nick: trunk timestamp: Thu 2014-03-27 02:17:54 +0100 message: src/image.c: Avoid partial load of SVG libraries. (init_svg_functions): When loading SVG-related libraries, free already loaded libraries if the initialization fails. (rsvg_handle_set_size_callback): Remove declaration, unused. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-03-26 15:57:13 +0000 +++ src/ChangeLog 2014-03-27 01:17:54 +0000 @@ -1,3 +1,9 @@ +2014-03-27 Juanma Barranquero + + * image.c (init_svg_functions): When loading SVG-related libraries, + free already loaded libraries if the initialization fails. + (rsvg_handle_set_size_callback): Remove declaration, unused. + 2014-03-26 Paul Eggert Fix core dump in char-equal (Bug#17011). === modified file 'src/image.c' --- src/image.c 2014-03-26 10:21:55 +0000 +++ src/image.c 2014-03-27 01:17:54 +0000 @@ -8661,7 +8661,6 @@ DEF_IMGLIB_FN (gboolean, rsvg_handle_write, (RsvgHandle *, const guchar *, gsize, GError **)); DEF_IMGLIB_FN (gboolean, rsvg_handle_close, (RsvgHandle *, GError **)); DEF_IMGLIB_FN (GdkPixbuf *, rsvg_handle_get_pixbuf, (RsvgHandle *)); -DEF_IMGLIB_FN (void *, rsvg_handle_set_size_callback, (RsvgHandle *, RsvgSizeFunc, gpointer, GDestroyNotify)); DEF_IMGLIB_FN (int, gdk_pixbuf_get_width, (const GdkPixbuf *)); DEF_IMGLIB_FN (int, gdk_pixbuf_get_height, (const GdkPixbuf *)); @@ -8683,13 +8682,18 @@ static bool init_svg_functions (void) { - HMODULE library, gdklib, glib, gobject; + HMODULE library, gdklib = NULL, glib = NULL, gobject = NULL; if (!(glib = w32_delayed_load (Qglib)) || !(gobject = w32_delayed_load (Qgobject)) || !(gdklib = w32_delayed_load (Qgdk_pixbuf)) || !(library = w32_delayed_load (Qsvg))) - return 0; + { + if (gdklib) FreeLibrary (gdklib); + if (gobject) FreeLibrary (gobject); + if (glib) FreeLibrary (glib); + return 0; + } LOAD_IMGLIB_FN (library, rsvg_handle_new); LOAD_IMGLIB_FN (library, rsvg_handle_get_dimensions); ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.