Now on revision 108414. ------------------------------------------------------------ revno: 108414 committer: Paul Eggert branch nick: trunk timestamp: Mon 2012-05-28 23:16:49 -0700 message: Spelling fixes. diff: === modified file 'etc/ORG-NEWS' --- etc/ORG-NEWS 2012-04-27 02:15:51 +0000 +++ etc/ORG-NEWS 2012-05-29 06:16:49 +0000 @@ -20,7 +20,7 @@ :PROPERTIES: :OrgVersion: 7.4 :END: - + The variable =org-agenda-ndays= is obsolete - please use =org-agenda-span= instead. @@ -313,7 +313,7 @@ :OrgVersion: 7.5 :END: - You can now create links from messages. This is particularily + You can now create links from messages. This is particularly useful when the user wants to stored messages that he sends, for later check. Thanks to Ulf Stegemann for the patch. @@ -328,7 +328,7 @@ : Percent escaping is used in Org mode to escape certain characters : in links that would either break the parser (e.g. square brackets -: in link target oder description) or are not allowed to appear in +: in link target or description) or are not allowed to appear in : a particular link type (e.g. non-ascii characters in a http: : link). : === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-05-28 16:11:15 +0000 +++ lisp/ChangeLog 2012-05-29 06:16:49 +0000 @@ -906,7 +906,7 @@ 2012-05-03 Kenichi Handa * mail/rmailmm.el (rmail-show-mime): Catch an error caused by text - decoding, and show a warning message without signalling an error + decoding, and show a warning message without signaling an error (Bug#11282). 2012-05-03 Stefan Monnier === modified file 'lisp/ChangeLog.15' --- lisp/ChangeLog.15 2012-03-21 18:27:05 +0000 +++ lisp/ChangeLog.15 2012-05-29 06:16:49 +0000 @@ -9023,7 +9023,7 @@ * bookmark.el (bookmark-show-annotation): Use `when' instead of `if'. This is also from Thierry Volpiatto's patch in bug #6444. However, because it was extraneous to the functional change in that patch, - and causes a re-indendation, I am committing it separately. + and causes a re-indentation, I am committing it separately. 2010-07-13 Thierry Volpiatto === modified file 'lisp/ChangeLog.9' --- lisp/ChangeLog.9 2012-02-24 19:32:46 +0000 +++ lisp/ChangeLog.9 2012-05-29 06:16:49 +0000 @@ -17245,7 +17245,7 @@ (antlr-downcase-literals): New command. (antlr-upcase-literals): Ditto. - * antlr-mode.el: Minor changes: indendation, mode-name. + * antlr-mode.el: Minor changes: indentation, mode-name. (antlr-indent-line): Indent cpp directive at column 0. (antlr-mode): Use mode-name prefix "Antlr." instead of "Antlr/". === modified file 'lisp/comint.el' --- lisp/comint.el 2012-05-15 16:58:35 +0000 +++ lisp/comint.el 2012-05-29 06:16:49 +0000 @@ -2969,7 +2969,7 @@ Word constituents are considered to be those in WORD-CHARS, which is like the inside of a \"[...]\" (see `skip-chars-forward'), plus all non-ASCII characters." ;; FIXME: Need to handle "..." and '...' quoting in shell.el! - ;; This should be combined with pomplete-parsing somehow. + ;; This should be combined with completion parsing somehow. (save-excursion (let ((here (point)) giveup) === modified file 'lisp/gnus/ChangeLog.1' --- lisp/gnus/ChangeLog.1 2012-01-19 07:21:25 +0000 +++ lisp/gnus/ChangeLog.1 2012-05-29 06:16:49 +0000 @@ -2966,7 +2966,7 @@ 1997-11-25 Lars Magne Ingebrigtsen - * gnus-move.el (gnus-move-group-to-server): Protect agains + * gnus-move.el (gnus-move-group-to-server): Protect against nil-ness. 1997-11-25 Lars Magne Ingebrigtsen === modified file 'lisp/gnus/gnus-win.el' --- lisp/gnus/gnus-win.el 2012-05-25 14:58:17 +0000 +++ lisp/gnus/gnus-win.el 2012-05-29 06:16:49 +0000 @@ -275,7 +275,7 @@ (set-buffer buf)) ((eq t (window-dedicated-p)) ;; If the window is hard-dedicated, we have a problem because - ;; we just can't do what we're asked. But signalling an error, + ;; we just can't do what we're asked. But signaling an error, ;; like `switch-to-buffer' would do, is not an option because ;; it would prevent things like "^" (to jump to the *Servers*) ;; in a dedicated *Group*. === modified file 'lisp/image-mode.el' --- lisp/image-mode.el 2012-05-14 05:19:46 +0000 +++ lisp/image-mode.el 2012-05-29 06:16:49 +0000 @@ -663,7 +663,7 @@ ;; The following comment and code snippet are from ;; ImageMagick-6.7.4-4/magick/distort.c -;; /* Set the output image geometry to calculated 'bestfit'. +;; /* Set the output image geometry to calculated 'best fit'. ;; Yes this tends to 'over do' the file image size, ON PURPOSE! ;; Do not do this for DePolar which needs to be exact for virtual tiling. ;; */ === modified file 'lisp/net/soap-client.el' --- lisp/net/soap-client.el 2012-04-25 10:28:29 +0000 +++ lisp/net/soap-client.el 2012-05-29 06:16:49 +0000 @@ -1569,7 +1569,7 @@ (defun soap-encode-simple-type (xml-tag value type) "Encode inside XML-TAG the LISP VALUE according to TYPE." - ;; Validate VALUE agains the simple type's enumeration, than just encode it + ;; Validate VALUE against the simple type's enumeration, than just encode it ;; using `soap-encode-basic-type' (let ((enumeration (soap-simple-type-enumeration type))) === modified file 'lisp/net/soap-inspect.el' --- lisp/net/soap-inspect.el 2012-04-25 10:28:29 +0000 +++ lisp/net/soap-inspect.el 2012-05-29 06:16:49 +0000 @@ -67,7 +67,7 @@ (t (format "%s" (soap-basic-type-kind type))))) (defun soap-sample-value-for-simple-type (type) - "Provive a sample value for TYPE which is a simple type. + "Provide a sample value for TYPE which is a simple type. This is a specific function which should not be called directly, use `soap-sample-value' instead." (let ((enumeration (soap-simple-type-enumeration type))) === modified file 'lisp/org/org-agenda.el' --- lisp/org/org-agenda.el 2012-05-16 17:33:50 +0000 +++ lisp/org/org-agenda.el 2012-05-29 06:16:49 +0000 @@ -799,7 +799,7 @@ :group 'org-agenda-daily/weekly :version "24.1" :type '(choice - (const :tag "Alwas show prewarning" nil) + (const :tag "Always show prewarning" nil) (const :tag "Remove prewarning if entry is scheduled" t) (integer :tag "Restart prewarning N days before deadline"))) === modified file 'lisp/org/org-remember.el' --- lisp/org/org-remember.el 2012-01-19 07:21:25 +0000 +++ lisp/org/org-remember.el 2012-05-29 06:16:49 +0000 @@ -64,7 +64,7 @@ \\[universal-argument] \\[org-remember-finalize] to file the note. When this variable is nil, \\[org-remember-finalize] gives you the prompts, and -\\[universal-argument] \\[org-remember-finalize] triggers the fasttrack." +\\[universal-argument] \\[org-remember-finalize] triggers the fast track." :group 'org-remember :type 'boolean) === modified file 'lisp/org/org.el' --- lisp/org/org.el 2012-05-25 21:09:08 +0000 +++ lisp/org/org.el 2012-05-29 06:16:49 +0000 @@ -3031,7 +3031,7 @@ (const :tag "List them, indented with leading dots" indented))) (defcustom org-tags-sort-function nil - "When set, tags are sorted using this function as a comparator." + "When set, tags are sorted using this comparison function." :group 'org-tags :type '(choice (const :tag "No sorting" nil) === modified file 'lisp/progmodes/verilog-mode.el' --- lisp/progmodes/verilog-mode.el 2012-05-03 19:23:55 +0000 +++ lisp/progmodes/verilog-mode.el 2012-05-29 06:16:49 +0000 @@ -12105,7 +12105,7 @@ "Expand AUTOUNDEF statements, as part of \\[verilog-auto]. Take any `defines since the last AUTOUNDEF in the current file and create `undefs for them. This is used to insure that -file-local defines do not polute the global `define name space. +file-local defines do not pollute the global `define name space. Limitations: AUTOUNDEF presumes any identifier following `define is the @@ -12145,7 +12145,7 @@ (end-pt (point)) defs def) (save-excursion - ;; Scan from beginnng of file, or last AUTOUNDEF + ;; Scan from start of file, or last AUTOUNDEF (or (verilog-re-search-backward-quick "/\\*AUTOUNDEF\\>" end-pt t) (goto-char (point-min))) (while (verilog-re-search-forward-quick === modified file 'lisp/textmodes/rst.el' --- lisp/textmodes/rst.el 2012-05-14 09:31:08 +0000 +++ lisp/textmodes/rst.el 2012-05-29 06:16:49 +0000 @@ -446,7 +446,7 @@ which is shy-grouped (\"\\(?:...\\)\"). For the keyword `:grp' the results are concatenated and form a -referencable grouped (\"\\(...\\)\"). +referenceable grouped (\"\\(...\\)\"). After interpretation of ARGS the results are concatenated as for `:seq'. @@ -1066,11 +1066,11 @@ (beg-pnt (progn (forward-line 0) (point))) - (nxt-emp ; Next line inexistant or empty + (nxt-emp ; Next line nonexistent or empty (save-excursion (or (not (zerop (forward-line 1))) (looking-at (rst-re 'lin-end))))) - (prv-emp ; Previous line inexistant or empty + (prv-emp ; Previous line nonexistent or empty (save-excursion (or (not (zerop (forward-line -1))) (looking-at (rst-re 'lin-end))))) @@ -1917,7 +1917,7 @@ "Insert a new list item. User is asked to select the item style first, for example (a), i), +. Use TAB -for completition and choices. +for completion and choices. If user selects bullets or #, it's just added with position arranged by `rst-insert-list-pos'. @@ -2020,7 +2020,7 @@ 1. When inserting a new list: User is asked to select the item style first, for example (a), i), +. Use TAB -for completition and choices. +for completion and choices. (a) If user selects bullets or #, it's just added. (b) If user selects enumerations, a further prompt is given. User needs to @@ -2754,11 +2754,11 @@ ;; supported; comment lines with leading comment markup should be also ;; supported; may be a customizable option could control which style to prefer -(defgroup rst-indent nil "Settings for indendation in reStructuredText. +(defgroup rst-indent nil "Settings for indentation in reStructuredText. -In reStructuredText indendation points are usually determined by +In reStructuredText indentation points are usually determined by preceding lines. Sometimes the syntax allows arbitrary -indendation points such as where to start the first line +indentation points such as where to start the first line following a directive. These indentation widths can be customized here." :group 'rst @@ -2772,25 +2772,25 @@ :type '(integer)) (defcustom rst-indent-field 3 - "Default indendation for first line after a field or 0 to always indent for + "Default indentation for first line after a field or 0 to always indent for content." :group 'rst-indent :type '(integer)) (defcustom rst-indent-literal-normal 3 - "Default indendation for literal block after a markup on an own + "Default indentation for literal block after a markup on an own line." :group 'rst-indent :type '(integer)) (defcustom rst-indent-literal-minimized 2 - "Default indendation for literal block after a minimized + "Default indentation for literal block after a minimized markup." :group 'rst-indent :type '(integer)) (defcustom rst-indent-comment 3 - "Default indendation for first line of a comment." + "Default indentation for first line of a comment." :group 'rst-indent :type '(integer)) @@ -2810,7 +2810,7 @@ (save-match-data (unless (looking-at (rst-re 'lin-end)) (back-to-indentation) - ;; Current indendation is always the least likely tab + ;; Current indentation is always the least likely tab (let ((tabs (list (list (point) 0 nil)))) ; (POINT OFFSET INNER) ;; Push inner tabs more likely to continue writing (cond @@ -2863,7 +2863,7 @@ Search backwards from point PT to build the list of possible tabs. Return a list of tabs sorted by likeliness to continue writing like `rst-line-tabs'. Nearer lines have generally a -higher likeliness than farer lines. Return nil if no tab is found +higher likeliness than farther lines. Return nil if no tab is found in the text above." (save-excursion (goto-char pt) @@ -3452,7 +3452,7 @@ 1 rst-definition-face) ;; `Hyperlink References`_ ;; FIXME: `Embedded URIs`_ not considered - ;; FIXME: Directly adjacing marked up words are not fontified correctly + ;; FIXME: Directly adjacent marked up words are not fontified correctly ;; unless they are not separated by two spaces: foo_ bar_ (,(rst-re 'ilm-pfx '(:grp (:alt (:seq "`" ilcbkq-tag "`") (:seq "\\sw" (:alt "\\sw" "-") "+\\sw")) @@ -3610,7 +3610,7 @@ ;; ;; * literal blocks following "::" ;; - ;; which are both indented. Thus indendation is the first thing recognized + ;; which are both indented. Thus indentation is the first thing recognized ;; here. The second criteria is an explicit markup tag which may be a comment ;; or a double colon at the end of a line. ;; @@ -3697,7 +3697,7 @@ `rst-font-lock-find-unindented-line-match'.") (defun rst-font-lock-find-unindented-line-limit (ind-pnt) - "Find the next unindented line relative to indenation at IND-PNT. + "Find the next unindented line relative to indentation at IND-PNT. Return this point, the end of the buffer or nil if nothing found. If IND-PNT is `next' take the indentation from the next line if this is not empty and indented more than the current one. If ------------------------------------------------------------ revno: 108413 committer: Katsumi Yamaoka branch nick: trunk timestamp: Tue 2012-05-29 05:19:41 +0000 message: Makefile.in (echo-info): Don't try to install info files named just ".info" diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2012-05-28 23:35:09 +0000 +++ doc/misc/ChangeLog 2012-05-29 05:19:41 +0000 @@ -1,3 +1,8 @@ +2012-05-29 Katsumi Yamaoka + + * Makefile.in (echo-info): Don't try to install info files named + just ".info". + 2012-05-28 Glenn Morris * calc.texi, dired-x.texi: Use @LaTeX rather than La@TeX. (Bug#10910) === modified file 'doc/misc/Makefile.in' --- doc/misc/Makefile.in 2012-05-14 11:59:28 +0000 +++ doc/misc/Makefile.in 2012-05-29 05:19:41 +0000 @@ -175,7 +175,7 @@ ## Base file names of output info files. echo-info: @echo "$(INFO_TARGETS) " | \ - sed -e 's|[^ ]*/||g' -e 's/\.info//g' -e "s/ /$(INFO_EXT) /g" + sed -e 's|[^ ]*/||g' -e 's/\.info//g' -e "s/ */$(INFO_EXT) /g" # please modify this for all the web manual targets webhack: clean ------------------------------------------------------------ revno: 108412 committer: Glenn Morris branch nick: trunk timestamp: Mon 2012-05-28 17:53:40 -0700 message: * doc/lispintro/emacs-lisp-intro.texi: Nuke hand-written node pointers. (dolist, dotimes): Fix sectioning. diff: === modified file 'doc/lispintro/ChangeLog' --- doc/lispintro/ChangeLog 2012-05-12 00:57:48 +0000 +++ doc/lispintro/ChangeLog 2012-05-29 00:53:40 +0000 @@ -1,3 +1,8 @@ +2012-05-29 Glenn Morris + + * emacs-lisp-intro.texi: Nuke hand-written node pointers. + (dolist, dotimes): Fix sectioning. + 2012-05-12 Glenn Morris * Makefile.in (MKDIR_P): New, set by configure. === modified file 'doc/lispintro/emacs-lisp-intro.texi' --- doc/lispintro/emacs-lisp-intro.texi 2012-05-09 03:06:08 +0000 +++ doc/lispintro/emacs-lisp-intro.texi 2012-05-29 00:53:40 +0000 @@ -315,7 +315,7 @@ @contents @ifnottex -@node Top, Preface, (dir), (dir) +@node Top @top An Introduction to Programming in Emacs Lisp @insertcopying @@ -829,8 +829,7 @@ @end detailmenu @end menu -@node Preface, List Processing, Top, Top -@comment node-name, next, previous, up +@node Preface @unnumbered Preface Most of the GNU Emacs integrated environment is written in the programming @@ -858,8 +857,8 @@ * Thank You:: @end menu -@node Why, On Reading this Text, Preface, Preface @ifnottex +@node Why @unnumberedsec Why Study Emacs Lisp? @end ifnottex @@ -873,8 +872,7 @@ fundamentals of programming, and more importantly, to show you how you can teach yourself to go further. -@node On Reading this Text, Who You Are, Why, Preface -@comment node-name, next, previous, up +@node On Reading this Text @unnumberedsec On Reading this Text All through this document, you will see little sample programs you can @@ -924,8 +922,7 @@ something new. This self-reliance is not only a pleasure, but an advantage. -@node Who You Are, Lisp History, On Reading this Text, Preface -@comment node-name, next, previous, up +@node Who You Are @unnumberedsec For Whom This is Written This text is written as an elementary introduction for people who are @@ -987,7 +984,7 @@ @cite{Introduction}, you will find the @cite{Reference Manual} useful when you are writing your own programs. -@node Lisp History, Note for Novices, Who You Are, Preface +@node Lisp History @unnumberedsec Lisp History @cindex Lisp history @@ -1004,8 +1001,7 @@ Lisp. (The standard Emacs distribution contains an optional extensions file, @file{cl.el}, that adds many Common Lisp features to Emacs Lisp.) -@node Note for Novices, Thank You, Lisp History, Preface -@comment node-name, next, previous, up +@node Note for Novices @unnumberedsec A Note for Novices If you don't know GNU Emacs, you can still read this document @@ -1052,8 +1048,7 @@ referring to the various dialects of Lisp in general, but when I speak of Emacs Lisp, I am referring to GNU Emacs Lisp in particular. -@node Thank You, , Note for Novices, Preface -@comment node-name, next, previous, up +@node Thank You @unnumberedsec Thank You My thanks to all who helped me with this book. My especial thanks to @@ -1099,8 +1094,7 @@ @global@pageno = 1 @end iftex -@node List Processing, Practicing Evaluation, Preface, Top -@comment node-name, next, previous, up +@node List Processing @chapter List Processing To the untutored eye, Lisp is a strange programming language. In Lisp @@ -1129,8 +1123,7 @@ * Error Message Exercises:: @end menu -@node Lisp Lists, Run a Program, List Processing, List Processing -@comment node-name, next, previous, up +@node Lisp Lists @section Lisp Lists @cindex Lisp Lists @@ -1161,8 +1154,8 @@ * Typing Lists:: How GNU Emacs helps you type lists. @end menu -@node Numbers Lists, Lisp Atoms, Lisp Lists, Lisp Lists @ifnottex +@node Numbers Lists @unnumberedsubsec Numbers, Lists inside of Lists @end ifnottex @@ -1190,8 +1183,7 @@ list is made up of the words @samp{a}, @samp{list}, @samp{inside}, @samp{of}, @samp{it}. -@node Lisp Atoms, Whitespace in Lists, Numbers Lists, Lisp Lists -@comment node-name, next, previous, up +@node Lisp Atoms @subsection Lisp Atoms @cindex Lisp Atoms @@ -1271,8 +1263,7 @@ Strings are a different kind of atom than numbers or symbols and are used differently. -@node Whitespace in Lists, Typing Lists, Lisp Atoms, Lisp Lists -@comment node-name, next, previous, up +@node Whitespace in Lists @subsection Whitespace in Lists @cindex Whitespace in lists @@ -1312,8 +1303,7 @@ (For certain situations, square brackets, dots and a few other special characters may be used; however, we will go quite far without them.) -@node Typing Lists, , Whitespace in Lists, Lisp Lists -@comment node-name, next, previous, up +@node Typing Lists @subsection GNU Emacs Helps You Type Lists @cindex Help typing lists @cindex Formatting help @@ -1335,8 +1325,7 @@ parenthesis. (@xref{Major Modes, , Major Modes, emacs, The GNU Emacs Manual}, for more information about Emacs's modes.) -@node Run a Program, Making Errors, Lisp Lists, List Processing -@comment node-name, next, previous, up +@node Run a Program @section Run a Program @cindex Run a program @cindex Program, running one @@ -1398,8 +1387,7 @@ But before discussing this (@pxref{Variables}), we will discuss what the Lisp interpreter does when you make an error. -@node Making Errors, Names & Definitions, Run a Program, List Processing -@comment node-name, next, previous, up +@node Making Errors @section Generate an Error Message @cindex Generate an error message @cindex Error message generation @@ -1549,8 +1537,7 @@ definition is void:@: this}. The symbol (that is, the word @samp{this}) lacks instructions for the computer to carry out. -@node Names & Definitions, Lisp Interpreter, Making Errors, List Processing -@comment node-name, next, previous, up +@node Names & Definitions @section Symbol Names and Function Definitions @cindex Symbol names @@ -1584,8 +1571,7 @@ @samp{texinfo-} and those for functions that deal with reading mail start with @samp{rmail-}. -@node Lisp Interpreter, Evaluation, Names & Definitions, List Processing -@comment node-name, next, previous, up +@node Lisp Interpreter @section The Lisp Interpreter @cindex Lisp interpreter, what it does @cindex Interpreter, what it does @@ -1610,8 +1596,8 @@ * Byte Compiling:: Specially processing code for speed. @end menu -@node Complications, Byte Compiling, Lisp Interpreter, Lisp Interpreter @ifnottex +@node Complications @unnumberedsubsec Complications @end ifnottex @@ -1642,7 +1628,7 @@ Otherwise, the interpreter works left to right, from one expression to the next. -@node Byte Compiling, , Complications, Lisp Interpreter +@node Byte Compiling @subsection Byte Compiling @cindex Byte compiling @@ -1665,8 +1651,7 @@ The GNU Emacs Lisp Reference Manual}, for a full description of byte compilation. -@node Evaluation, Variables, Lisp Interpreter, List Processing -@comment node-name, next, previous, up +@node Evaluation @section Evaluation @cindex Evaluation @@ -1682,8 +1667,8 @@ * Evaluating Inner Lists:: Lists within lists... @end menu -@node How the Interpreter Acts, Evaluating Inner Lists, Evaluation, Evaluation @ifnottex +@node How the Interpreter Acts @unnumberedsubsec How the Lisp Interpreter Acts @end ifnottex @@ -1709,8 +1694,7 @@ Lisp interpreter to return a value and perhaps carry out a side effect; or else produce an error. -@node Evaluating Inner Lists, , How the Interpreter Acts, Evaluation -@comment node-name, next, previous, up +@node Evaluating Inner Lists @subsection Evaluating Inner Lists @cindex Inner list evaluation @cindex Evaluating inner lists @@ -1773,8 +1757,7 @@ symbol by itself is evaluated, something different happens, as we will see in the next section. -@node Variables, Arguments, Evaluation, List Processing -@comment node-name, next, previous, up +@node Variables @section Variables @cindex Variables @@ -1813,8 +1796,8 @@ * Void Variable:: The error message for a symbol without a value. @end menu -@node fill-column Example, Void Function, Variables, Variables @ifnottex +@node fill-column Example @unnumberedsubsec @code{fill-column}, an Example Variable @end ifnottex @@ -1851,8 +1834,7 @@ Setting the Value of a Variable}, for information about one way to do this. -@node Void Function, Void Variable, fill-column Example, Variables -@comment node-name, next, previous, up +@node Void Function @subsection Error Message for a Symbol Without a Function @cindex Symbol without function error @cindex Error for symbol without function @@ -1904,8 +1886,7 @@ another key.) @end ignore -@node Void Variable, , Void Function, Variables -@comment node-name, next, previous, up +@node Void Variable @subsection Error Message for a Symbol Without a Value @cindex Symbol without value error @cindex Error for symbol without value @@ -1971,8 +1952,7 @@ The meaning is the same as in GNU Emacs 22. @end ignore -@node Arguments, set & setq, Variables, List Processing -@comment node-name, next, previous, up +@node Arguments @section Arguments @cindex Arguments @cindex Passing information to functions @@ -2025,8 +2005,7 @@ * message:: A useful function for sending messages. @end menu -@node Data types, Args as Variable or List, Arguments, Arguments -@comment node-name, next, previous, up +@node Data types @subsection Arguments' Data Types @cindex Data types @cindex Types of data @@ -2080,8 +2059,7 @@ a substring from an argument that is a string, not from another type of atom such as a number or symbol. -@node Args as Variable or List, Variable Number of Arguments, Data types, Arguments -@comment node-name, next, previous, up +@node Args as Variable or List @subsection An Argument as the Value of a Variable or List An argument can be a symbol that returns a value when it is evaluated. @@ -2122,8 +2100,7 @@ integer that the addition function returns to a string. @code{number-to-string} is also known as @code{int-to-string}.) -@node Variable Number of Arguments, Wrong Type of Argument, Args as Variable or List, Arguments -@comment node-name, next, previous, up +@node Variable Number of Arguments @subsection Variable Number of Arguments @cindex Variable number of arguments @cindex Arguments, variable number of @@ -2167,8 +2144,7 @@ @end group @end smallexample -@node Wrong Type of Argument, message, Variable Number of Arguments, Arguments -@comment node-name, next, previous, up +@node Wrong Type of Argument @subsection Using the Wrong Type Object as an Argument @cindex Wrong type of argument @cindex Argument, wrong type of @@ -2262,8 +2238,7 @@ @file{*Backtrace*} buffer. @end ignore -@node message, , Wrong Type of Argument, Arguments -@comment node-name, next, previous, up +@node message @subsection The @code{message} Function @findex message @@ -2375,8 +2350,7 @@ message @code{"He saw 38 red foxes leaping."} appears in your echo area. -@node set & setq, Summary, Arguments, List Processing -@comment node-name, next, previous, up +@node set & setq @section Setting the Value of a Variable @cindex Variable, setting value @cindex Setting value of variable @@ -2396,8 +2370,7 @@ * Counting:: Using @code{setq} to count. @end menu -@node Using set, Using setq, set & setq, set & setq -@comment node-name, next, previous, up +@node Using set @subsection Using @code{set} @findex set @@ -2453,8 +2426,7 @@ the value that was returned. There are situations where this is the right thing for the function to do; but such situations are rare.) -@node Using setq, Counting, Using set, set & setq -@comment node-name, next, previous, up +@node Using setq @subsection Using @code{setq} @findex setq @@ -2514,8 +2486,7 @@ specifically a list, attached to it; or, expressed another way, the symbol is set to ``point'' to the list. -@node Counting, , Using setq, set & setq -@comment node-name, next, previous, up +@node Counting @subsection Counting @cindex Counting @@ -2561,8 +2532,7 @@ @code{setq} which sets the variable @code{counter} to this new value. Thus, the value of the variable, @code{counter}, is changed. -@node Summary, Error Message Exercises, set & setq, List Processing -@comment node-name, next, previous, up +@node Summary @section Summary Learning Lisp is like climbing a hill in which the first part is the @@ -2624,8 +2594,7 @@ create a side effect. @end itemize -@node Error Message Exercises, , Summary, List Processing -@comment node-name, next, previous, up +@node Error Message Exercises @section Exercises A few simple exercises: @@ -2647,8 +2616,7 @@ evaluated. @end itemize -@node Practicing Evaluation, Writing Defuns, List Processing, Top -@comment node-name, next, previous, up +@node Practicing Evaluation @chapter Practicing Evaluation @cindex Practicing evaluation @cindex Evaluation practice @@ -2673,8 +2641,8 @@ * Evaluation Exercise:: @end menu -@node How to Evaluate, Buffer Names, Practicing Evaluation, Practicing Evaluation @ifnottex +@node How to Evaluate @unnumberedsec How to Evaluate @end ifnottex @@ -2705,8 +2673,7 @@ functions makes clear the distinction between buffers and files, how to switch to a buffer, and how to determine a location within it. -@node Buffer Names, Getting Buffers, How to Evaluate, Practicing Evaluation -@comment node-name, next, previous, up +@node Buffer Names @section Buffer Names @findex buffer-name @findex buffer-file-name @@ -2831,8 +2798,7 @@ buffer you can edit; and when you write code or documentation (such as this book), this feature is very useful. -@node Getting Buffers, Switching Buffers, Buffer Names, Practicing Evaluation -@comment node-name, next, previous, up +@node Getting Buffers @section Getting Buffers @findex current-buffer @findex other-buffer @@ -2900,8 +2866,7 @@ will choose the most recent buffer that you cannot see; this is a subtlety that I often forget.}. -@node Switching Buffers, Buffer Size & Locations, Getting Buffers, Practicing Evaluation -@comment node-name, next, previous, up +@node Switching Buffers @section Switching Buffers @findex switch-to-buffer @findex set-buffer @@ -2990,8 +2955,7 @@ it---just as a plumber is an entity who can fix a leak if you call him or her. -@node Buffer Size & Locations, Evaluation Exercise, Switching Buffers, Practicing Evaluation -@comment node-name, next, previous, up +@node Buffer Size & Locations @section Buffer Size and the Location of Point @cindex Size of buffer @cindex Buffer size @@ -3058,14 +3022,13 @@ function @code{point-max} returns the value of the maximum permissible value of point in the current buffer. -@node Evaluation Exercise, , Buffer Size & Locations, Practicing Evaluation +@node Evaluation Exercise @section Exercise Find a file with which you are working and move towards its middle. Find its buffer name, file name, length, and your position in the file. -@node Writing Defuns, Buffer Walk Through, Practicing Evaluation, Top -@comment node-name, next, previous, up +@node Writing Defuns @chapter How To Write Function Definitions @cindex Definition writing @cindex Function definition writing @@ -3095,8 +3058,8 @@ * defun Exercises:: @end menu -@node Primitive Functions, defun, Writing Defuns, Writing Defuns @ifnottex +@node Primitive Functions @unnumberedsec An Aside about Primitive Functions @end ifnottex @cindex Primitive functions @@ -3121,8 +3084,7 @@ unless you investigate, you won't know whether an already-written function is written in Emacs Lisp or C. -@node defun, Install, Primitive Functions, Writing Defuns -@comment node-name, next, previous, up +@node defun @section The @code{defun} Special Form @findex defun @cindex Special form of @code{defun} @@ -3294,8 +3256,7 @@ definition of the function. Installation is described in the next section. -@node Install, Interactive, defun, Writing Defuns -@comment node-name, next, previous, up +@node Install @section Install a Function Definition @cindex Install a Function Definition @cindex Definition installation @@ -3332,8 +3293,8 @@ * Change a defun:: How to change a function definition. @end menu -@node Effect of installation, Change a defun, Install, Install @ifnottex +@node Effect of installation @unnumberedsubsec The effect of installation @end ifnottex @@ -3363,8 +3324,7 @@ @noindent (To return to a single window on your screen, type @kbd{C-x 1}.) -@node Change a defun, , Effect of installation, Install -@comment node-name, next, previous, up +@node Change a defun @subsection Change a Function Definition @cindex Changing a function definition @cindex Function definition, how to change @@ -3409,8 +3369,7 @@ function; install it; test it; and then make fixes or enhancements and install it again. -@node Interactive, Interactive Options, Install, Writing Defuns -@comment node-name, next, previous, up +@node Interactive @section Make a Function Interactive @cindex Interactive functions @findex interactive @@ -3434,8 +3393,8 @@ * multiply-by-seven in detail:: The interactive version. @end menu -@node Interactive multiply-by-seven, multiply-by-seven in detail, Interactive, Interactive @ifnottex +@node Interactive multiply-by-seven @unnumberedsubsec An Interactive @code{multiply-by-seven}, An Overview @end ifnottex @@ -3490,8 +3449,7 @@ typing @kbd{C-u} and then a number, for example, @kbd{C-u 3 M-e} (if you type @kbd{C-u} without a number, it defaults to 4). -@node multiply-by-seven in detail, , Interactive multiply-by-seven, Interactive -@comment node-name, next, previous, up +@node multiply-by-seven in detail @subsection An Interactive @code{multiply-by-seven} Let's look at the use of the special form @code{interactive} and then at @@ -3560,8 +3518,7 @@ function, @code{message} prints the text as a side effect without quotes.) -@node Interactive Options, Permanent Installation, Interactive, Writing Defuns -@comment node-name, next, previous, up +@node Interactive Options @section Different Options for @code{interactive} @cindex Options for @code{interactive} @cindex Interactive options @@ -3639,8 +3596,7 @@ elisp, The GNU Emacs Lisp Reference Manual}, for a more complete explanation about this technique. -@node Permanent Installation, let, Interactive Options, Writing Defuns -@comment node-name, next, previous, up +@node Permanent Installation @section Install Code Permanently @cindex Install code permanently @cindex Permanent code installation @@ -3688,8 +3644,7 @@ others, it may be included in the next release of Emacs. In large part, this is how Emacs has grown over the past years, by donations. -@node let, if, Permanent Installation, Writing Defuns -@comment node-name, next, previous, up +@node let @section @code{let} @findex let @@ -3721,8 +3676,8 @@ * Uninitialized let Variables:: @end menu -@node Prevent confusion, Parts of let Expression, let, let @ifnottex +@node Prevent confusion @unnumberedsubsec @code{let} Prevents Confusion @end ifnottex @@ -3760,8 +3715,7 @@ Dictionary}). Since you evaluate an expression to perform an action, `execute' has evolved as a synonym to `evaluate'.) -@node Parts of let Expression, Sample let Expression, Prevent confusion, let -@comment node-name, next, previous, up +@node Parts of let Expression @subsection The Parts of a @code{let} Expression @cindex @code{let} expression, parts of @cindex Parts of @code{let} expression @@ -3809,8 +3763,7 @@ @end group @end smallexample -@node Sample let Expression, Uninitialized let Variables, Parts of let Expression, let -@comment node-name, next, previous, up +@node Sample let Expression @subsection Sample @code{let} Expression @cindex Sample @code{let} expression @cindex @code{let} expression sample @@ -3860,8 +3813,7 @@ value of the variable @code{tiger} is printed at the location of the second @samp{%s}. -@node Uninitialized let Variables, , Sample let Expression, let -@comment node-name, next, previous, up +@node Uninitialized let Variables @subsection Uninitialized Variables in a @code{let} Statement @cindex Uninitialized @code{let} variables @cindex @code{let} variables uninitialized @@ -3909,8 +3861,7 @@ @samp{%s}.) The four variables as a group are put into a list to delimit them from the body of the @code{let}. -@node if, else, let, Writing Defuns -@comment node-name, next, previous, up +@node if @section The @code{if} Special Form @findex if @cindex Conditional with @code{if} @@ -3932,8 +3883,8 @@ * type-of-animal in detail:: An example of an @code{if} expression. @end menu -@node if in more detail, type-of-animal in detail, if, if @ifnottex +@node if in more detail @unnumberedsubsec @code{if} in more detail @end ifnottex @@ -4023,8 +3974,7 @@ when you evaluate @code{(type-of-animal 'zebra)} you will see @code{nil} printed in the echo area. -@node type-of-animal in detail, , if in more detail, if -@comment node-name, next, previous, up +@node type-of-animal in detail @subsection The @code{type-of-animal} Function in Detail Let's look at the @code{type-of-animal} function in detail. @@ -4111,8 +4061,7 @@ is not equal to @code{fierce}, so the then-part is not evaluated and @code{nil} is returned by the @code{if} expression. -@node else, Truth & Falsehood, if, Writing Defuns -@comment node-name, next, previous, up +@node else @section If--then--else Expressions @cindex Else @@ -4200,8 +4149,7 @@ possibility that some such argument will be tested by the @code{if} and write your program accordingly.) -@node Truth & Falsehood, save-excursion, else, Writing Defuns -@comment node-name, next, previous, up +@node Truth & Falsehood @section Truth and Falsehood in Emacs Lisp @cindex Truth and falsehood in Emacs Lisp @cindex Falsehood and truth in Emacs Lisp @@ -4224,8 +4172,8 @@ * nil explained:: @code{nil} has two meanings. @end menu -@node nil explained, , Truth & Falsehood, Truth & Falsehood @ifnottex +@node nil explained @unnumberedsubsec An explanation of @code{nil} @end ifnottex @@ -4288,8 +4236,7 @@ (> 4 5) @end smallexample -@node save-excursion, Review, Truth & Falsehood, Writing Defuns -@comment node-name, next, previous, up +@node save-excursion @section @code{save-excursion} @findex save-excursion @cindex Region, what it is @@ -4313,8 +4260,8 @@ * Template for save-excursion:: @end menu -@node Point and mark, Template for save-excursion, save-excursion, save-excursion @ifnottex +@node Point and mark @unnumberedsubsec Point and Mark @end ifnottex @@ -4371,8 +4318,7 @@ This is how @code{save-excursion} is used in @code{append-to-buffer}. (@xref{append-to-buffer, , The Definition of @code{append-to-buffer}}.) -@node Template for save-excursion, , Point and mark, save-excursion -@comment node-name, next, previous, up +@node Template for save-excursion @subsection Template for a @code{save-excursion} Expression @need 800 @@ -4423,8 +4369,7 @@ @end group @end smallexample -@node Review, defun Exercises, save-excursion, Writing Defuns -@comment node-name, next, previous, up +@node Review @section Review In the last few chapters we have introduced a fair number of functions @@ -4677,7 +4622,7 @@ @end table @need 1500 -@node defun Exercises, , Review, Writing Defuns +@node defun Exercises @section Exercises @itemize @bullet @@ -4691,8 +4636,7 @@ and if so, prints an appropriate message. @end itemize -@node Buffer Walk Through, More Complex, Writing Defuns, Top -@comment node-name, next, previous, up +@node Buffer Walk Through @chapter A Few Buffer--Related Functions In this chapter we study in detail several of the functions used in GNU @@ -4714,7 +4658,7 @@ * Buffer Exercises:: @end menu -@node Finding More, simplified-beginning-of-buffer, Buffer Walk Through, Buffer Walk Through +@node Finding More @section Finding More Information @findex describe-function, @r{introduced} @@ -4810,8 +4754,7 @@ @kbd{C-h p} command lets you search the standard Emacs Lisp libraries by topic keywords.'' -@node simplified-beginning-of-buffer, mark-whole-buffer, Finding More, Buffer Walk Through -@comment node-name, next, previous, up +@node simplified-beginning-of-buffer @section A Simplified @code{beginning-of-buffer} Definition @findex simplified-beginning-of-buffer @@ -4939,8 +4882,7 @@ function contains the expression @code{(goto-char (point-max))} in place of @code{(goto-char (point-min))}. -@node mark-whole-buffer, append-to-buffer, simplified-beginning-of-buffer, Buffer Walk Through -@comment node-name, next, previous, up +@node mark-whole-buffer @section The Definition of @code{mark-whole-buffer} @findex mark-whole-buffer @@ -4959,8 +4901,8 @@ * Body of mark-whole-buffer:: Only three lines of code. @end menu -@node mark-whole-buffer overview, Body of mark-whole-buffer, mark-whole-buffer, mark-whole-buffer @ifnottex +@node mark-whole-buffer overview @unnumberedsubsec An overview of @code{mark-whole-buffer} @end ifnottex @@ -5006,8 +4948,7 @@ previous section. @need 1250 -@node Body of mark-whole-buffer, , mark-whole-buffer overview, mark-whole-buffer -@comment node-name, next, previous, up +@node Body of mark-whole-buffer @subsection Body of @code{mark-whole-buffer} The body of the @code{mark-whole-buffer} function consists of three @@ -5080,8 +5021,7 @@ is set at the end of the buffer. The whole buffer is, therefore, the region. -@node append-to-buffer, Buffer Related Review, mark-whole-buffer, Buffer Walk Through -@comment node-name, next, previous, up +@node append-to-buffer @section The Definition of @code{append-to-buffer} @findex append-to-buffer @@ -5097,8 +5037,8 @@ * append save-excursion:: How the @code{save-excursion} works. @end menu -@node append-to-buffer overview, append interactive, append-to-buffer, append-to-buffer @ifnottex +@node append-to-buffer overview @unnumberedsubsec An Overview of @code{append-to-buffer} @end ifnottex @@ -5178,8 +5118,7 @@ Note that the documentation distinguishes between a buffer and its name. (The function can handle either.) -@node append interactive, append-to-buffer body, append-to-buffer overview, append-to-buffer -@comment node-name, next, previous, up +@node append interactive @subsection The @code{append-to-buffer} Interactive Expression Since the @code{append-to-buffer} function will be used interactively, @@ -5247,8 +5186,7 @@ argument list (that is, @code{start} and @code{end}) to the values of point and mark. That argument worked fine.) -@node append-to-buffer body, append save-excursion, append interactive, append-to-buffer -@comment node-name, next, previous, up +@node append-to-buffer body @subsection The Body of @code{append-to-buffer} @ignore @@ -5347,8 +5285,7 @@ boundary of the varlist and the second parenthesis marks the beginning of the two-element list, @code{(oldbuf (current-buffer))}. -@node append save-excursion, , append-to-buffer body, append-to-buffer -@comment node-name, next, previous, up +@node append save-excursion @subsection @code{save-excursion} in @code{append-to-buffer} The body of the @code{let} expression in @code{append-to-buffer} @@ -5525,8 +5462,7 @@ buffer. Many function definitions use @code{let}, @code{save-excursion}, and @code{set-buffer} this way. -@node Buffer Related Review, Buffer Exercises, append-to-buffer, Buffer Walk Through -@comment node-name, next, previous, up +@node Buffer Related Review @section Review Here is a brief summary of the various functions discussed in this chapter. @@ -5578,7 +5514,7 @@ @end table @need 1500 -@node Buffer Exercises, , Buffer Related Review, Buffer Walk Through +@node Buffer Exercises @section Exercises @itemize @bullet @@ -5595,8 +5531,7 @@ function. @end itemize -@node More Complex, Narrowing & Widening, Buffer Walk Through, Top -@comment node-name, next, previous, up +@node More Complex @chapter A Few More Complex Functions In this chapter, we build on what we have learned in previous chapters @@ -5616,8 +5551,7 @@ * optional Exercise:: @end menu -@node copy-to-buffer, insert-buffer, More Complex, More Complex -@comment node-name, next, previous, up +@node copy-to-buffer @section The Definition of @code{copy-to-buffer} @findex copy-to-buffer @@ -5695,8 +5629,7 @@ @end group @end smallexample -@node insert-buffer, beginning-of-buffer, copy-to-buffer, More Complex -@comment node-name, next, previous, up +@node insert-buffer @section The Definition of @code{insert-buffer} @findex insert-buffer @@ -5725,8 +5658,8 @@ * New insert-buffer:: @end menu -@node insert-buffer code, insert-buffer interactive, insert-buffer, insert-buffer @ifnottex +@node insert-buffer code @unnumberedsubsec The Code for @code{insert-buffer} @end ifnottex @@ -5770,8 +5703,7 @@ @end group @end smallexample -@node insert-buffer interactive, insert-buffer body, insert-buffer code, insert-buffer -@comment node-name, next, previous, up +@node insert-buffer interactive @subsection The Interactive Expression in @code{insert-buffer} @findex interactive, @r{example use of} @@ -5784,8 +5716,7 @@ * b for interactive:: An existing buffer or else its name. @end menu -@node Read-only buffer, b for interactive, insert-buffer interactive, insert-buffer interactive -@comment node-name, next, previous, up +@node Read-only buffer @unnumberedsubsubsec A Read-only Buffer @cindex Read-only buffer @cindex Asterisk for read-only buffer @@ -5799,8 +5730,7 @@ into current buffer. The asterisk does not need to be followed by a newline to separate it from the next argument. -@node b for interactive, , Read-only buffer, insert-buffer interactive -@comment node-name, next, previous, up +@node b for interactive @unnumberedsubsubsec @samp{b} in an Interactive Expression The next argument in the interactive expression starts with a lower @@ -5820,8 +5750,7 @@ functions with which we are already familiar and the @code{progn} special form with which we are not. (It will be described later.) -@node insert-buffer body, if & or, insert-buffer interactive, insert-buffer -@comment node-name, next, previous, up +@node insert-buffer body @subsection The Body of the @code{insert-buffer} Function The body of the @code{insert-buffer} function has two major parts: an @@ -5856,8 +5785,7 @@ Before doing this, let me rewrite this part of the function using @code{if} so that you can see what is done in a manner that will be familiar. -@node if & or, Insert or, insert-buffer body, insert-buffer -@comment node-name, next, previous, up +@node if & or @subsection @code{insert-buffer} With an @code{if} Instead of an @code{or} The job to be done is to make sure the value of @code{buffer} is a @@ -5937,8 +5865,7 @@ @code{buffer} to the value of the buffer itself, replacing its previous value (which was the name of the buffer). -@node Insert or, Insert let, if & or, insert-buffer -@comment node-name, next, previous, up +@node Insert or @subsection The @code{or} in the Body The purpose of the @code{or} expression in the @code{insert-buffer} @@ -5996,8 +5923,7 @@ (or (holding-on-to-guest) (find-and-take-arm-of-guest)) @end smallexample -@node Insert let, New insert-buffer, Insert or, insert-buffer -@comment node-name, next, previous, up +@node Insert let @subsection The @code{let} Expression in @code{insert-buffer} After ensuring that the variable @code{buffer} refers to a buffer itself @@ -6095,8 +6021,7 @@ use @code{or}. All these functions are building blocks that we will find and use again and again. -@node New insert-buffer, , Insert let, insert-buffer -@comment node-name, next, previous, up +@node New insert-buffer @subsection New Body for @code{insert-buffer} @findex insert-buffer, new version body @findex new version body for insert-buffer @@ -6134,8 +6059,7 @@ exists only to produce a side effect, inserting another buffer, not to return any value. -@node beginning-of-buffer, Second Buffer Related Review, insert-buffer, More Complex -@comment node-name, next, previous, up +@node beginning-of-buffer @section Complete Definition of @code{beginning-of-buffer} @findex beginning-of-buffer @@ -6167,7 +6091,7 @@ * beginning-of-buffer complete:: @end menu -@node Optional Arguments, beginning-of-buffer opt arg, beginning-of-buffer, beginning-of-buffer +@node Optional Arguments @subsection Optional Arguments Unless told otherwise, Lisp expects that a function with an argument in @@ -6250,7 +6174,7 @@ is how we saw the @code{beginning-of-buffer} function in its simplified form. -@node beginning-of-buffer opt arg, beginning-of-buffer complete, Optional Arguments, beginning-of-buffer +@node beginning-of-buffer opt arg @subsection @code{beginning-of-buffer} with an Argument When @code{beginning-of-buffer} is called with an argument, an @@ -6278,8 +6202,8 @@ * Small buffer case:: @end menu -@node Disentangle beginning-of-buffer, Large buffer case, beginning-of-buffer opt arg, beginning-of-buffer opt arg @ifnottex +@node Disentangle beginning-of-buffer @unnumberedsubsubsec Disentangle @code{beginning-of-buffer} @end ifnottex @@ -6308,8 +6232,7 @@ There are two cases: if the buffer is large and if it is not. -@node Large buffer case, Small buffer case, Disentangle beginning-of-buffer, beginning-of-buffer opt arg -@comment node-name, next, previous, up +@node Large buffer case @unnumberedsubsubsec What happens in a large buffer In @code{beginning-of-buffer}, the inner @code{if} expression tests @@ -6392,8 +6315,7 @@ This puts the cursor where we want it. -@node Small buffer case, , Large buffer case, beginning-of-buffer opt arg -@comment node-name, next, previous, up +@node Small buffer case @unnumberedsubsubsec What happens in a small buffer If the buffer contains fewer than 10,000 characters, a slightly @@ -6450,8 +6372,7 @@ the cursor is moved to that point. @need 1500 -@node beginning-of-buffer complete, , beginning-of-buffer opt arg, beginning-of-buffer -@comment node-name, next, previous, up +@node beginning-of-buffer complete @subsection The Complete @code{beginning-of-buffer} @need 1000 @@ -6579,8 +6500,7 @@ intended or whether no one has dealt with the code to avoid this happening. -@node Second Buffer Related Review, optional Exercise, beginning-of-buffer, More Complex -@comment node-name, next, previous, up +@node Second Buffer Related Review @section Review Here is a brief summary of some of the topics covered in this chapter. @@ -6623,7 +6543,7 @@ Return @code{t} if its argument is a buffer; otherwise return @code{nil}. @end table -@node optional Exercise, , Second Buffer Related Review, More Complex +@node optional Exercise @section @code{optional} Argument Exercise Write an interactive function with an optional argument that tests @@ -6632,8 +6552,7 @@ message. However, if you do not pass an argument to the function, use 56 as a default value. -@node Narrowing & Widening, car cdr & cons, More Complex, Top -@comment node-name, next, previous, up +@node Narrowing & Widening @chapter Narrowing and Widening @cindex Focusing attention (narrowing) @cindex Narrowing @@ -6651,8 +6570,8 @@ * narrow Exercise:: @end menu -@node Narrowing advantages, save-restriction, Narrowing & Widening, Narrowing & Widening @ifnottex +@node Narrowing advantages @unnumberedsec The Advantages of Narrowing @end ifnottex @@ -6686,8 +6605,7 @@ of the buffer in which it is interested and then restores the previous situation. -@node save-restriction, what-line, Narrowing advantages, Narrowing & Widening -@comment node-name, next, previous, up +@node save-restriction @section The @code{save-restriction} Special Form @findex save-restriction @@ -6804,8 +6722,7 @@ (- (buffer-size) (forward-line (buffer-size))))))) @end ignore -@node what-line, narrow Exercise, save-restriction, Narrowing & Widening -@comment node-name, next, previous, up +@node what-line @section @code{what-line} @findex what-line @cindex Widening, example of @@ -6938,7 +6855,7 @@ mark to their original positions; and @code{save-restriction} restores the original narrowing, if any. -@node narrow Exercise, , what-line, Narrowing & Widening +@node narrow Exercise @section Exercise with Narrowing Write a function that will display the first 60 characters of the @@ -6961,8 +6878,7 @@ Additionally, do you really need @code{goto-char} or @code{point-min}? Or can you write the function without them? -@node car cdr & cons, Cutting & Storing Text, Narrowing & Widening, Top -@comment node-name, next, previous, up +@node car cdr & cons @chapter @code{car}, @code{cdr}, @code{cons}: Fundamental Functions @findex car, @r{introduced} @findex cdr, @r{introduced} @@ -6986,8 +6902,8 @@ * cons Exercise:: @end menu -@node Strange Names, car & cdr, car cdr & cons, car cdr & cons @ifnottex +@node Strange Names @unnumberedsec Strange Names @end ifnottex @@ -7006,8 +6922,7 @@ terms are used in the Emacs Lisp source code, we will use them in this introduction. -@node car & cdr, cons, Strange Names, car cdr & cons -@comment node-name, next, previous, up +@node car & cdr @section @code{car} and @code{cdr} The @sc{car} of a list is, quite simply, the first item in the list. @@ -7129,8 +7044,7 @@ by array-specific functions. @xref{Arrays, , Arrays, elisp, The GNU Emacs Lisp Reference Manual}.) -@node cons, nthcdr, car & cdr, car cdr & cons -@comment node-name, next, previous, up +@node cons @section @code{cons} @findex cons, @r{introduced} @@ -7167,8 +7081,8 @@ * length:: How to find the length of a list. @end menu -@node Build a list, length, cons, cons @ifnottex +@node Build a list @unnumberedsubsec Build a list @end ifnottex @@ -7218,8 +7132,7 @@ and the third example constructs a three element list by putting @code{violet} in front of @code{daisy} and @code{buttercup}. -@node length, , Build a list, cons -@comment node-name, next, previous, up +@node length @subsection Find the Length of a List: @code{length} @findex length @@ -7300,8 +7213,7 @@ about subroutines. @end ignore -@node nthcdr, nth, cons, car cdr & cons -@comment node-name, next, previous, up +@node nthcdr @section @code{nthcdr} @findex nthcdr @@ -7425,8 +7337,7 @@ @end group @end smallexample -@node nth, setcar, nthcdr, car cdr & cons -@comment node-name, next, previous, up +@node nth @section @code{nth} @findex nth @@ -7478,8 +7389,7 @@ non-destructive. This is in sharp contrast to the @code{setcar} and @code{setcdr} functions. -@node setcar, setcdr, nth, car cdr & cons -@comment node-name, next, previous, up +@node setcar @section @code{setcar} @findex setcar @@ -7554,8 +7464,7 @@ as @code{cons} would have; it replaced @code{antelope} with @code{hippopotamus}; it @emph{changed} the list. -@node setcdr, cons Exercise, setcar, car cdr & cons -@comment node-name, next, previous, up +@node setcdr @section @code{setcdr} @findex setcdr @@ -7614,7 +7523,7 @@ @code{(horse cat dog)}. The @sc{cdr} of the list is changed from @code{(cow sheep goat)} to @code{(cat dog)}. -@node cons Exercise, , setcdr, car cdr & cons +@node cons Exercise @section Exercise Construct a list of four birds by evaluating several expressions with @@ -7622,8 +7531,7 @@ itself. Replace the first element of the list of four birds with a fish. Replace the rest of that list with a list of other fish. -@node Cutting & Storing Text, List Implementation, car cdr & cons, Top -@comment node-name, next, previous, up +@node Cutting & Storing Text @chapter Cutting and Storing Text @cindex Cutting and storing text @cindex Storing and cutting text @@ -7655,8 +7563,8 @@ * search Exercises:: @end menu -@node Storing Text, zap-to-char, Cutting & Storing Text, Cutting & Storing Text @ifnottex +@node Storing Text @unnumberedsec Storing Text in a List @end ifnottex @@ -7722,8 +7630,7 @@ A subsequent chapter describes how text that is cut from the buffer is retrieved. @xref{Yanking, , Yanking Text Back}. -@node zap-to-char, kill-region, Storing Text, Cutting & Storing Text -@comment node-name, next, previous, up +@node zap-to-char @section @code{zap-to-char} @findex zap-to-char @@ -7751,8 +7658,8 @@ * Summing up zap-to-char:: Using @code{point} and @code{search-forward}. @end menu -@node Complete zap-to-char, zap-to-char interactive, zap-to-char, zap-to-char @ifnottex +@node Complete zap-to-char @unnumberedsubsec The Complete @code{zap-to-char} Implementation @end ifnottex @@ -7812,8 +7719,7 @@ The documentation is thorough. You do need to know the jargon meaning of the word `kill'. -@node zap-to-char interactive, zap-to-char body, Complete zap-to-char, zap-to-char -@comment node-name, next, previous, up +@node zap-to-char interactive @subsection The @code{interactive} Expression @need 800 @@ -7848,8 +7754,7 @@ message saying that the buffer is read-only. Also, the terminal may beep or blink at you. -@node zap-to-char body, search-forward, zap-to-char interactive, zap-to-char -@comment node-name, next, previous, up +@node zap-to-char body @subsection The Body of @code{zap-to-char} The body of the @code{zap-to-char} function contains the code that @@ -7887,8 +7792,7 @@ @code{search-forward}, so we will look at @code{search-forward} and then at @code{progn}. -@node search-forward, progn, zap-to-char body, zap-to-char -@comment node-name, next, previous, up +@node search-forward @subsection The @code{search-forward} Function @findex search-forward @@ -7963,8 +7867,7 @@ We will look at @code{progn} next. -@node progn, Summing up zap-to-char, search-forward, zap-to-char -@comment node-name, next, previous, up +@node progn @subsection The @code{progn} Special Form @findex progn @@ -8004,8 +7907,7 @@ returned by the @code{progn} expression and is passed to @code{kill-region} as @code{kill-region}'s second argument. -@node Summing up zap-to-char, , progn, zap-to-char -@comment node-name, next, previous, up +@node Summing up zap-to-char @subsection Summing up @code{zap-to-char} Now that we have seen how @code{search-forward} and @code{progn} work, @@ -8026,8 +7928,7 @@ a single argument to @code{kill-region} and returns the one value that @code{kill-region} needs for its second argument. -@node kill-region, copy-region-as-kill, zap-to-char, Cutting & Storing Text -@comment node-name, next, previous, up +@node kill-region @section @code{kill-region} @findex kill-region @@ -8111,8 +8012,8 @@ * Lisp macro:: @end menu -@node Complete kill-region, condition-case, kill-region, kill-region @ifnottex +@node Complete kill-region @unnumberedsubsec The Complete @code{kill-region} Definition @end ifnottex @@ -8299,8 +8200,7 @@ @end smallexample @end ignore -@node condition-case, Lisp macro, Complete kill-region, kill-region -@comment node-name, next, previous, up +@node condition-case @subsection @code{condition-case} @findex condition-case @@ -8386,8 +8286,7 @@ Initializing a Variable with @code{defvar} includes line 8350 @end ignore -@node Lisp macro, , condition-case, kill-region -@comment node-name, next, previous, up +@node Lisp macro @subsection Lisp macro @cindex Macro, lisp @cindex Lisp macro @@ -8458,8 +8357,7 @@ concatenates a copy of the newly clipped text to the just previously clipped text in the kill ring. -@node copy-region-as-kill, Digression into C, kill-region, Cutting & Storing Text -@comment node-name, next, previous, up +@node copy-region-as-kill @section @code{copy-region-as-kill} @findex copy-region-as-kill @findex nthcdr @@ -8480,8 +8378,8 @@ * copy-region-as-kill body:: The body of @code{copy-region-as-kill}. @end menu -@node Complete copy-region-as-kill, copy-region-as-kill body, copy-region-as-kill, copy-region-as-kill @ifnottex +@node Complete copy-region-as-kill @unnumberedsubsec The complete @code{copy-region-as-kill} function definition @end ifnottex @@ -8559,8 +8457,7 @@ The body of @code{copy-region-as-kill} merits discussion in detail. -@node copy-region-as-kill body, , Complete copy-region-as-kill, copy-region-as-kill -@comment node-name, next, previous, up +@node copy-region-as-kill body @subsection The Body of @code{copy-region-as-kill} The @code{copy-region-as-kill} function works in much the same way as @@ -8583,8 +8480,8 @@ * kill-new function:: @end menu -@node last-command & this-command, kill-append function, copy-region-as-kill body, copy-region-as-kill body @ifnottex +@node last-command & this-command @unnumberedsubsubsec @code{last-command} and @code{this-command} @end ifnottex @@ -8639,7 +8536,7 @@ If the previous command was @code{kill-region}, then the Emacs Lisp interpreter calls the @code{kill-append} function -@node kill-append function, kill-new function, last-command & this-command, copy-region-as-kill body +@node kill-append function @unnumberedsubsubsec The @code{kill-append} function @findex kill-append @@ -8771,7 +8668,7 @@ saved text. The @code{kill-append} function uses the @code{kill-new} function which in turn uses the @code{setcar} function. -@node kill-new function, , kill-append function, copy-region-as-kill body +@node kill-new function @unnumberedsubsubsec The @code{kill-new} function @findex kill-new @@ -9200,8 +9097,7 @@ see Initializing a Variable with @code{defvar} @end ignore -@node Digression into C, defvar, copy-region-as-kill, Cutting & Storing Text -@comment node-name, next, previous, up +@node Digression into C @section Digression into C @findex delete-and-extract-region @cindex C, a digression into @@ -9366,8 +9262,7 @@ simple; but hidden underneath is a great deal of complexity to make it all work. -@node defvar, cons & search-fwd Review, Digression into C, Cutting & Storing Text -@comment node-name, next, previous, up +@node defvar @section Initializing a Variable with @code{defvar} @findex defvar @cindex Initializing a variable @@ -9416,8 +9311,8 @@ * defvar and asterisk:: @end menu -@node See variable current value, defvar and asterisk, defvar, defvar @ifnottex +@node See variable current value @unnumberedsubsec Seeing the Current Value of a Variable @end ifnottex @@ -9468,7 +9363,7 @@ Succeeding lines should not be indented; otherwise they look odd when you use @kbd{C-h v} (@code{describe-variable}). -@node defvar and asterisk, , See variable current value, defvar +@node defvar and asterisk @subsection @code{defvar} and an asterisk @findex defvar @r{for a user customizable variable} @findex defvar @r{with an asterisk} @@ -9514,8 +9409,7 @@ The GNU Emacs Manual}.) @need 1250 -@node cons & search-fwd Review, search Exercises, defvar, Cutting & Storing Text -@comment node-name, next, previous, up +@node cons & search-fwd Review @section Review Here is a brief summary of some recently introduced functions. @@ -9664,7 +9558,7 @@ (This is not an interactive command.) @need 1500 -@node search Exercises, , cons & search-fwd Review, Cutting & Storing Text +@node search Exercises @section Searching Exercises @itemize @bullet @@ -9682,8 +9576,7 @@ print an appropriate message. @end itemize -@node List Implementation, Yanking, Cutting & Storing Text, Top -@comment node-name, next, previous, up +@node List Implementation @chapter How Lists are Implemented @cindex Lists in a computer @@ -9707,8 +9600,8 @@ * List Exercise:: @end menu -@node Lists diagrammed, Symbols as Chest, List Implementation, List Implementation @ifnottex +@node Lists diagrammed @unnumberedsec Lists diagrammed @end ifnottex @@ -10047,7 +9940,7 @@ In summary, when a Lisp variable is set to a value, it is provided with the address of the list to which the variable refers. -@node Symbols as Chest, List Exercise, Lists diagrammed, List Implementation +@node Symbols as Chest @section Symbols as a Chest of Drawers @cindex Symbols as a Chest of Drawers @cindex Chest of Drawers, metaphor for a symbol @@ -10148,7 +10041,7 @@ @end iftex @end ifclear -@node List Exercise, , Symbols as Chest, List Implementation +@node List Exercise @section Exercise Set @code{flowers} to @code{violet} and @code{buttercup}. Cons two @@ -10156,8 +10049,7 @@ @code{more-flowers}. Set the @sc{car} of @code{flowers} to a fish. What does the @code{more-flowers} list now contain? -@node Yanking, Loops & Recursion, List Implementation, Top -@comment node-name, next, previous, up +@node Yanking @chapter Yanking Text Back @findex yank @cindex Text retrieval @@ -10188,8 +10080,7 @@ * yank nthcdr Exercises:: The @code{kill-ring-yank-pointer} variable. @end menu -@node Kill Ring Overview, kill-ring-yank-pointer, Yanking, Yanking -@comment node-name, next, previous, up +@node Kill Ring Overview @section Kill Ring Overview @cindex Kill ring overview @@ -10232,8 +10123,7 @@ To begin to understand how @code{yank} and @code{yank-pop} work, it is first necessary to look at the @code{kill-ring-yank-pointer} variable. -@node kill-ring-yank-pointer, yank nthcdr Exercises, Kill Ring Overview, Yanking -@comment node-name, next, previous, up +@node kill-ring-yank-pointer @section The @code{kill-ring-yank-pointer} Variable @code{kill-ring-yank-pointer} is a variable, just as @code{kill-ring} is @@ -10372,7 +10262,7 @@ @end ignore @need 1500 -@node yank nthcdr Exercises, , kill-ring-yank-pointer, Yanking +@node yank nthcdr Exercises @section Exercises with @code{yank} and @code{nthcdr} @itemize @bullet @@ -10389,8 +10279,7 @@ to return the first, second, third, and fourth elements of a list. @end itemize -@node Loops & Recursion, Regexp Search, Yanking, Top -@comment node-name, next, previous, up +@node Loops & Recursion @chapter Loops and Recursion @cindex Loops and recursion @cindex Recursion and loops @@ -10426,8 +10315,7 @@ * Looping exercise:: @end menu -@node while, dolist dotimes, Loops & Recursion, Loops & Recursion -@comment node-name, next, previous, up +@node while @section @code{while} @cindex Loops @findex while @@ -10465,8 +10353,8 @@ * Decrementing Loop:: A loop with a decrementing counter. @end menu -@node Looping with while, Loop Example, while, while @ifnottex +@node Looping with while @unnumberedsubsec Looping with @code{while} @end ifnottex @@ -10499,8 +10387,7 @@ but the consequences of what happens when the expressions in the loop are repeatedly evaluated. -@node Loop Example, print-elements-of-list, Looping with while, while -@comment node-name, next, previous, up +@node Loop Example @subsection A @code{while} Loop and a List A common way to control a @code{while} loop is to test whether a list @@ -10604,7 +10491,7 @@ goes through a list and prints each element of the list on a line of its own. -@node print-elements-of-list, Incrementing Loop, Loop Example, while +@node print-elements-of-list @subsection An Example: @code{print-elements-of-list} @findex print-elements-of-list @@ -10683,8 +10570,7 @@ @code{while} loop, and since @code{while} loops always return @code{nil}, a @code{nil} is printed after the last element of the list. -@node Incrementing Loop, Incrementing Loop Details, print-elements-of-list, while -@comment node-name, next, previous, up +@node Incrementing Loop @subsection A Loop with an Incrementing Counter A loop is not useful unless it stops when it ought. Besides @@ -10694,8 +10580,8 @@ have a counter---an expression that counts how many times the loop repeats itself. -@node Incrementing Loop Details, Decrementing Loop, Incrementing Loop, while @ifnottex +@node Incrementing Loop Details @unnumberedsubsec Details of an Incrementing Loop @end ifnottex @@ -10733,7 +10619,7 @@ * Inc Example altogether:: Putting the function definition together. @end menu -@node Incrementing Example, Inc Example parts, Incrementing Loop Details, Incrementing Loop Details +@node Incrementing Example @unnumberedsubsubsec Example with incrementing counter Suppose you are playing on the beach and decide to make a triangle of @@ -10800,7 +10686,7 @@ complex loop the repetitive action might not be so simple, but it will be simpler than doing everything all at once. -@node Inc Example parts, Inc Example altogether, Incrementing Example, Incrementing Loop Details +@node Inc Example parts @unnumberedsubsubsec The parts of the function definition The preceding analysis gives us the bones of our function definition: @@ -10894,7 +10780,7 @@ (setq row-number (1+ row-number)) @end smallexample -@node Inc Example altogether, , Inc Example parts, Incrementing Loop Details +@node Inc Example altogether @unnumberedsubsubsec Putting the function definition together We have created the parts for the function definition; now we need to @@ -11004,8 +10890,7 @@ The sum of the first four numbers is 10 and the sum of the first seven numbers is 28. -@node Decrementing Loop, , Incrementing Loop Details, while -@comment node-name, next, previous, up +@node Decrementing Loop @subsection Loop with a Decrementing Counter Another common way to write a @code{while} loop is to write the test @@ -11041,7 +10926,7 @@ * Dec Example altogether:: Putting the function definition together. @end menu -@node Decrementing Example, Dec Example parts, Decrementing Loop, Decrementing Loop +@node Decrementing Example @unnumberedsubsubsec Example with decrementing counter To illustrate a loop with a decrementing counter, we will rewrite the @@ -11068,7 +10953,7 @@ many pebbles are in the preceding row: it is one less than the number in the row. -@node Dec Example parts, Dec Example altogether, Decrementing Example, Decrementing Loop +@node Dec Example parts @unnumberedsubsubsec The parts of the function definition We start with three variables: the total number of rows in the @@ -11130,7 +11015,7 @@ (while (> number-of-pebbles-in-row 0) @end smallexample -@node Dec Example altogether, , Dec Example parts, Decrementing Loop +@node Dec Example altogether @unnumberedsubsubsec Putting the function definition together We can put these expressions together to create a function definition @@ -11201,8 +11086,7 @@ number of times. @end enumerate -@node dolist dotimes, Recursion, while, Loops & Recursion -@comment node-name, next, previous, up +@node dolist dotimes @section Save your time: @code{dolist} and @code{dotimes} In addition to @code{while}, both @code{dolist} and @code{dotimes} @@ -11222,8 +11106,8 @@ * dotimes:: @end menu -@node dolist, dotimes, dolist dotimes, dolist dotimes -@unnumberedsubsubsec The @code{dolist} Macro +@node dolist +@unnumberedsubsec The @code{dolist} Macro @findex dolist Suppose, for example, you want to reverse a list, so that @@ -11326,8 +11210,8 @@ the expression; and repeats the loop. The result is returned in @code{value}. -@node dotimes, , dolist, dolist dotimes -@unnumberedsubsubsec The @code{dotimes} Macro +@node dotimes +@unnumberedsubsec The @code{dotimes} Macro @findex dotimes The @code{dotimes} macro is similar to @code{dolist}, except that it @@ -11376,8 +11260,7 @@ @end group @end smallexample -@node Recursion, Looping exercise, dolist dotimes, Loops & Recursion -@comment node-name, next, previous, up +@node Recursion @section Recursion @cindex Recursion @@ -11403,8 +11286,7 @@ * No deferment solution:: @end menu -@node Building Robots, Recursive Definition Parts, Recursion, Recursion -@comment node-name, next, previous, up +@node Building Robots @subsection Building Robots: Extending the Metaphor @cindex Building robots @cindex Robots, building @@ -11441,8 +11323,7 @@ It is important that the arguments differ from one instance to the next; otherwise, the process will never stop. -@node Recursive Definition Parts, Recursion with list, Building Robots, Recursion -@comment node-name, next, previous, up +@node Recursive Definition Parts @subsection The Parts of a Recursive Definition @cindex Parts of a Recursive Definition @cindex Recursive Definition Parts @@ -11506,8 +11387,7 @@ The do-again-test is sometimes called the @dfn{stop condition}, since it stops the repetitions when it tests false. -@node Recursion with list, Recursive triangle function, Recursive Definition Parts, Recursion -@comment node-name, next, previous, up +@node Recursion with list @subsection Recursion with a List The example of a @code{while} loop that printed the elements of a list @@ -11599,8 +11479,7 @@ @end smallexample @need 2000 -@node Recursive triangle function, Recursion with cond, Recursion with list, Recursion -@comment node-name, next, previous, up +@node Recursive triangle function @subsection Recursion in Place of a Counter @findex triangle-recursively @@ -11638,8 +11517,8 @@ * Recursive Example arg of 3 or 4:: @end menu -@node Recursive Example arg of 1 or 2, Recursive Example arg of 3 or 4, Recursive triangle function, Recursive triangle function @ifnottex +@node Recursive Example arg of 1 or 2 @unnumberedsubsubsec An argument of 1 or 2 @end ifnottex @@ -11701,7 +11580,7 @@ pebbles in it. @end table -@node Recursive Example arg of 3 or 4, , Recursive Example arg of 1 or 2, Recursive triangle function +@node Recursive Example arg of 3 or 4 @unnumberedsubsubsec An argument of 3 or 4 Suppose that @code{triangle-recursively} is called with an argument of @@ -11791,8 +11670,7 @@ There is a way around this kind of waiting, which we will discuss in @ref{No Deferment, , Recursion without Deferments}. -@node Recursion with cond, Recursive Patterns, Recursive triangle function, Recursion -@comment node-name, next, previous, up +@node Recursion with cond @subsection Recursion Example Using @code{cond} @findex cond @@ -11868,8 +11746,7 @@ number (triangle-using-cond (1- number)))} if the number is greater than 1. -@node Recursive Patterns, No Deferment, Recursion with cond, Recursion -@comment node-name, next, previous, up +@node Recursive Patterns @subsection Recursive Patterns @cindex Recursive Patterns @@ -11883,8 +11760,7 @@ * Keep:: @end menu -@node Every, Accumulate, Recursive Patterns, Recursive Patterns -@comment node-name, next, previous, up +@node Every @unnumberedsubsubsec Recursive Pattern: @emph{every} @cindex Every, type of recursive pattern @cindex Recursive pattern: every @@ -11983,8 +11859,7 @@ @end itemize @end itemize -@node Accumulate, Keep, Every, Recursive Patterns -@comment node-name, next, previous, up +@node Accumulate @unnumberedsubsubsec Recursive Pattern: @emph{accumulate} @cindex Accumulate, type of recursive pattern @cindex Recursive pattern: accumulate @@ -12035,8 +11910,7 @@ @xref{Files List, , Making a List of Files}, for an example of the accumulate pattern. -@node Keep, , Accumulate, Recursive Patterns -@comment node-name, next, previous, up +@node Keep @unnumberedsubsubsec Recursive Pattern: @emph{keep} @cindex Keep, type of recursive pattern @cindex Recursive pattern: keep @@ -12105,7 +11979,7 @@ It goes without saying that you need not use @code{nil} as the test for when to stop; and you can, of course, combine these patterns. -@node No Deferment, No deferment solution, Recursive Patterns, Recursion +@node No Deferment @subsection Recursion without Deferments @cindex Deferment in recursion @cindex Recursion without Deferments @@ -12188,7 +12062,7 @@ steps, as in this example. But it can be a problem when there are more steps. -@node No deferment solution, , No Deferment, Recursion +@node No deferment solution @subsection No Deferment Solution @cindex No deferment solution @cindex Defermentless solution @@ -12352,7 +12226,7 @@ many resources in a computer. @need 1500 -@node Looping exercise, , Recursion, Loops & Recursion +@node Looping exercise @section Looping Exercise @itemize @bullet @@ -12399,8 +12273,7 @@ @end iftex @end itemize -@node Regexp Search, Counting Words, Loops & Recursion, Top -@comment node-name, next, previous, up +@node Regexp Search @chapter Regular Expression Searches @cindex Searches, illustrating @cindex Regular expression searches @@ -12446,8 +12319,7 @@ * re-search Exercises:: @end menu -@node sentence-end, re-search-forward, Regexp Search, Regexp Search -@comment node-name, next, previous, up +@node sentence-end @section The Regular Expression for @code{sentence-end} @findex sentence-end @@ -12598,8 +12470,7 @@ @end table @end ignore -@node re-search-forward, forward-sentence, sentence-end, Regexp Search -@comment node-name, next, previous, up +@node re-search-forward @section The @code{re-search-forward} Function @findex re-search-forward @@ -12673,8 +12544,7 @@ function will return @code{nil}; and the repeat count will be provided by the argument to the @code{forward-sentence} function. -@node forward-sentence, forward-paragraph, re-search-forward, Regexp Search -@comment node-name, next, previous, up +@node forward-sentence @section @code{forward-sentence} @findex forward-sentence @@ -12691,8 +12561,8 @@ * fwd-sentence re-search:: A regular expression search. @end menu -@node Complete forward-sentence, fwd-sentence while loops, forward-sentence, forward-sentence @ifnottex +@node Complete forward-sentence @unnumberedsubsec Complete @code{forward-sentence} function definition @end ifnottex @@ -12818,7 +12688,7 @@ equivalents. The @code{sentence-end} variable is set by the @code{sentence-end} function. -@node fwd-sentence while loops, fwd-sentence re-search, Complete forward-sentence, forward-sentence +@node fwd-sentence while loops @unnumberedsubsec The @code{while} loops Two @code{while} loops follow. The first @code{while} has a @@ -12919,7 +12789,7 @@ the @code{forward-sentence} function buried here, but this is a common way this kind of operation is carried out in Lisp. -@node fwd-sentence re-search, , fwd-sentence while loops, forward-sentence +@node fwd-sentence re-search @unnumberedsubsec The regular expression search The @code{re-search-forward} function searches for the end of the @@ -12967,8 +12837,7 @@ test of an @code{if} expression, is handy. You will see or write code incorporating this pattern often. -@node forward-paragraph, etags, forward-sentence, Regexp Search -@comment node-name, next, previous, up +@node forward-paragraph @section @code{forward-paragraph}: a Goldmine of Functions @findex forward-paragraph @@ -13151,8 +13020,8 @@ * fwd-para while:: The forward motion @code{while} loop. @end menu -@node forward-paragraph in brief, fwd-para let, forward-paragraph, forward-paragraph @ifnottex +@node forward-paragraph in brief @unnumberedsubsec Shortened @code{forward-paragraph} function definition @end ifnottex @@ -13191,7 +13060,7 @@ @code{forward-sentence} function}.) Now we reach the end of the familiar part of this function. -@node fwd-para let, fwd-para while, forward-paragraph in brief, forward-paragraph +@node fwd-para let @unnumberedsubsec The @code{let*} expression The next line of the @code{forward-paragraph} function begins a @@ -13323,7 +13192,7 @@ negative argument and is therefore moving backwards. We will skip this section. -@node fwd-para while, , fwd-para let, forward-paragraph +@node fwd-para while @unnumberedsubsec The forward motion @code{while} loop The second part of the body of the @code{let*} deals with forward @@ -13596,7 +13465,7 @@ your sources! Without them, you are like a person who tries to drive a car with his eyes shut!) -@node etags, Regexp Review, forward-paragraph, Regexp Search +@node etags @section Create Your Own @file{TAGS} File @findex etags @cindex @file{TAGS} file, create own @@ -13720,8 +13589,7 @@ For more information, see @ref{Tags, , Tag Tables, emacs, The GNU Emacs Manual}. -@node Regexp Review, re-search Exercises, etags, Regexp Search -@comment node-name, next, previous, up +@node Regexp Review @section Review Here is a brief summary of some recently introduced functions. @@ -13812,7 +13680,7 @@ @end table @need 1500 -@node re-search Exercises, , Regexp Review, Regexp Search +@node re-search Exercises @section Exercises with @code{re-search-forward} @itemize @bullet @@ -13830,7 +13698,7 @@ regexps. @xref{the-the, , @code{the-the} Duplicated Words Function}. @end itemize -@node Counting Words, Words in a defun, Regexp Search, Top +@node Counting Words @chapter Counting: Repetition and Regexps @cindex Repetition for word counting @cindex Regular expressions for word counting @@ -13847,8 +13715,8 @@ * Counting Exercise:: @end menu -@node Why Count Words, @value{COUNT-WORDS}, Counting Words, Counting Words @ifnottex +@node Why Count Words @unnumberedsec Counting words @end ifnottex @@ -13869,8 +13737,7 @@ some examples, which you may wish to compare with the standard Emacs command, @code{count-words-region}. -@node @value{COUNT-WORDS}, recursive-count-words, Why Count Words, Counting Words -@comment node-name, next, previous, up +@node @value{COUNT-WORDS} @section The @code{@value{COUNT-WORDS}} Function @findex @value{COUNT-WORDS} @@ -13895,8 +13762,8 @@ * Whitespace Bug:: The Whitespace Bug in @code{@value{COUNT-WORDS}}. @end menu -@node Design @value{COUNT-WORDS}, Whitespace Bug, @value{COUNT-WORDS}, @value{COUNT-WORDS} @ifnottex +@node Design @value{COUNT-WORDS} @unnumberedsubsec Designing @code{@value{COUNT-WORDS}} @end ifnottex @@ -14072,8 +13939,7 @@ @noindent As written, the function works, but not in all circumstances. -@node Whitespace Bug, , Design @value{COUNT-WORDS}, @value{COUNT-WORDS} -@comment node-name, next, previous, up +@node Whitespace Bug @subsection The Whitespace Bug in @code{@value{COUNT-WORDS}} The @code{@value{COUNT-WORDS}} command described in the preceding @@ -14325,8 +14191,7 @@ @end group @end smallexample -@node recursive-count-words, Counting Exercise, @value{COUNT-WORDS}, Counting Words -@comment node-name, next, previous, up +@node recursive-count-words @section Count Words Recursively @cindex Count words recursively @cindex Recursively counting words @@ -14704,14 +14569,14 @@ @end group @end smallexample -@node Counting Exercise, , recursive-count-words, Counting Words +@node Counting Exercise @section Exercise: Counting Punctuation Using a @code{while} loop, write a function to count the number of punctuation marks in a region---period, comma, semicolon, colon, exclamation mark, and question mark. Do the same using recursion. -@node Words in a defun, Readying a Graph, Counting Words, Top +@node Words in a defun @chapter Counting Words in a @code{defun} @cindex Counting words in a @code{defun} @cindex Word counting in a @code{defun} @@ -14744,8 +14609,8 @@ * Prepare the data:: Prepare the data for display in a graph. @end menu -@node Divide and Conquer, Words and Symbols, Words in a defun, Words in a defun @ifnottex +@node Divide and Conquer @unnumberedsec Divide and Conquer @end ifnottex @@ -14782,7 +14647,7 @@ This is quite a project! But if we take each step slowly, it will not be difficult. -@node Words and Symbols, Syntax, Divide and Conquer, Words in a defun +@node Words and Symbols @section What to Count? @cindex Words and symbols in defun @@ -14836,7 +14701,7 @@ characters' brings us to the issue of syntax, which is worth a section of its own. -@node Syntax, count-words-in-defun, Words and Symbols, Words in a defun +@node Syntax @section What Constitutes a Word or Symbol? @cindex Syntax categories and tables @@ -14920,7 +14785,7 @@ "\\(\\w\\|\\s_\\)+[^ \t\n]*[ \t\n]*" @end smallexample -@node count-words-in-defun, Several defuns, Syntax, Words in a defun +@node count-words-in-defun @section The @code{count-words-in-defun} Function @cindex Counting words in a @code{defun} @@ -15114,7 +14979,7 @@ The next problem is to count the numbers of words and symbols in several definitions within a single file. -@node Several defuns, Find a File, count-words-in-defun, Words in a defun +@node Several defuns @section Count Several @code{defuns} Within a File A file such as @file{simple.el} may have a hundred or more function @@ -15169,8 +15034,7 @@ Finding a file is a new process that we have not yet discussed. -@node Find a File, lengths-list-file, Several defuns, Words in a defun -@comment node-name, next, previous, up +@node Find a File @section Find a File @cindex Find a File @@ -15253,7 +15117,7 @@ The task is easy: use @code{find-file-noselect} and @code{set-buffer}. -@node lengths-list-file, Several files, Find a File, Words in a defun +@node lengths-list-file @section @code{lengths-list-file} in Detail The core of the @code{lengths-list-file} function is a @code{while} @@ -15394,7 +15258,7 @@ Note that the length of the last definition in the file is first in the list. -@node Several files, Several files recursively, lengths-list-file, Words in a defun +@node Several files @section Count Words in @code{defuns} in Different Files In the previous section, we created a function that returns a list of @@ -15410,8 +15274,8 @@ * append:: Attach one list to another. @end menu -@node lengths-list-many-files, append, Several files, Several files @ifnottex +@node lengths-list-many-files @unnumberedsubsec Determine the lengths of @code{defuns} @end ifnottex @@ -15507,7 +15371,7 @@ unstudied function @code{append}, which merits a short section for itself. -@node append, , lengths-list-many-files, Several files +@node append @subsection The @code{append} Function @need 800 @@ -15542,7 +15406,7 @@ ((1 2 3 4) 5 6 7 8) @end smallexample -@node Several files recursively, Prepare the data, Several files, Words in a defun +@node Several files recursively @section Recursively Count Words in Different Files Besides a @code{while} loop, you can work on each of a list of files @@ -15625,7 +15489,7 @@ The next step is to prepare the data in the list for display in a graph. -@node Prepare the data, , Several files recursively, Words in a defun +@node Prepare the data @section Prepare the Data for Display in a Graph The @code{recursive-lengths-list-many-files} function returns a list @@ -15648,8 +15512,8 @@ * Counting function definitions:: @end menu -@node Data for Display in Detail, Sorting, Prepare the data, Prepare the data @ifnottex +@node Data for Display in Detail @unnumberedsubsec The Data for Display in Detail @end ifnottex @@ -15667,7 +15531,7 @@ number, and thereby determine the largest and smallest length range that we will need. -@node Sorting, Files List, Data for Display in Detail, Prepare the data +@node Sorting @subsection Sorting Lists @findex sort @@ -15746,7 +15610,7 @@ quoted, since the expression must be evaluated so as to produce the list that is passed to @code{sort}.) -@node Files List, Counting function definitions, Sorting, Prepare the data +@node Files List @subsection Making a List of Files The @code{recursive-lengths-list-many-files} function requires a list @@ -16007,7 +15871,7 @@ (insert (format "%s" (current-time-string)))) @end ignore -@node Counting function definitions, , Files List, Prepare the data +@node Counting function definitions @subsection Counting function definitions Our immediate goal is to generate a list that tells us how many @@ -16311,7 +16175,7 @@ of 200 or larger. @c The next step is to turn this numbers' list into a graph. -@node Readying a Graph, Emacs Initialization, Words in a defun, Top +@node Readying a Graph @chapter Readying a Graph @cindex Readying a graph @cindex Graph prototype @@ -16343,8 +16207,8 @@ * Line Graph Exercise:: @end menu -@node Columns of a graph, graph-body-print, Readying a Graph, Readying a Graph @ifnottex +@node Columns of a graph @unnumberedsec Printing the Columns of a Graph @end ifnottex @@ -16716,7 +16580,7 @@ This prints the body of a graph, not the labels for the vertical and horizontal axes, so we can call this @code{graph-body-print}. -@node graph-body-print, recursive-graph-body-print, Columns of a graph, Readying a Graph +@node graph-body-print @section The @code{graph-body-print} Function @findex graph-body-print @@ -16875,7 +16739,7 @@ @end group @end smallexample -@node recursive-graph-body-print, Printed Axes, graph-body-print, Readying a Graph +@node recursive-graph-body-print @section The @code{recursive-graph-body-print} Function @findex recursive-graph-body-print @@ -16962,7 +16826,7 @@ Either of these two functions, @code{graph-body-print} or @code{recursive-graph-body-print}, create the body of a graph. -@node Printed Axes, Line Graph Exercise, recursive-graph-body-print, Readying a Graph +@node Printed Axes @section Need for Printed Axes A graph needs printed axes, so you can orient yourself. For a do-once @@ -16975,12 +16839,12 @@ do not contain much new material, I have placed their description in an appendix. @xref{Full Graph, , A Graph with Labeled Axes}. -@node Line Graph Exercise, , Printed Axes, Readying a Graph +@node Line Graph Exercise @section Exercise Write a line graph version of the graph printing functions. -@node Emacs Initialization, Debugging, Readying a Graph, Top +@node Emacs Initialization @chapter Your @file{.emacs} File @cindex @file{.emacs} file @cindex Customizing your @file{.emacs} file @@ -17012,8 +16876,8 @@ * Mode Line:: How to customize your mode line. @end menu -@node Default Configuration, Site-wide Init, Emacs Initialization, Emacs Initialization @ifnottex +@node Default Configuration @unnumberedsec Emacs's Default Configuration @end ifnottex @@ -17059,7 +16923,7 @@ @ref{Init File, , The Init File, elisp, The GNU Emacs Lisp Reference Manual}. -@node Site-wide Init, defcustom, Default Configuration, Emacs Initialization +@node Site-wide Init @section Site-wide Initialization Files @cindex @file{default.el} init file @@ -17105,7 +16969,7 @@ what to put into your own @file{.emacs} file, or into a site-wide initialization file. -@node defcustom, Beginning a .emacs File, Site-wide Init, Emacs Initialization +@node defcustom @section Specifying Variables using @code{defcustom} @findex defcustom @@ -17270,7 +17134,7 @@ set by @code{defconst}. (You can change it; the value set is a variable; but please do not.) -@node Beginning a .emacs File, Text and Auto-fill, defcustom, Emacs Initialization +@node Beginning a .emacs File @section Beginning a @file{.emacs} File @cindex @file{.emacs} file, beginning of @@ -17353,7 +17217,7 @@ about Mode help or the conventions for comments---but I was able to remember to look here to remind myself. -@node Text and Auto-fill, Mail Aliases, Beginning a .emacs File, Emacs Initialization +@node Text and Auto-fill @section Text and Auto Fill Mode Now we come to the part that `turns on' Text mode and @@ -17475,7 +17339,7 @@ (setq colon-double-space t) @end smallexample -@node Mail Aliases, Indent Tabs Mode, Text and Auto-fill, Emacs Initialization +@node Mail Aliases @section Mail Aliases Here is a @code{setq} that `turns on' mail aliases, along with more @@ -17509,7 +17373,7 @@ When you write a message to George, address it to @samp{geo}; the mailer will automatically expand @samp{geo} to the full address. -@node Indent Tabs Mode, Keybindings, Mail Aliases, Emacs Initialization +@node Indent Tabs Mode @section Indent Tabs Mode @cindex Tabs, preventing @findex indent-tabs-mode @@ -17547,7 +17411,7 @@ @end iftex @need 1700 -@node Keybindings, Keymaps, Indent Tabs Mode, Emacs Initialization +@node Keybindings @section Some Keybindings Now for some personal keybindings: @@ -17660,7 +17524,7 @@ command, which not only lists the buffers, but moves point into that window. -@node Keymaps, Loading Files, Keybindings, Emacs Initialization +@node Keymaps @section Keymaps @cindex Keymaps @cindex Rebinding keys @@ -17728,7 +17592,7 @@ Manual}, and @ref{Keymaps, , Keymaps, elisp, The GNU Emacs Lisp Reference Manual}, for more information about keymaps. -@node Loading Files, Autoload, Keymaps, Emacs Initialization +@node Loading Files @section Loading Files @cindex Loading files @c findex load @@ -17820,7 +17684,7 @@ Emacs, emacs, The GNU Emacs Manual}, for information on the distinction between @code{load-library} and this command. -@node Autoload, Simple Extension, Loading Files, Emacs Initialization +@node Autoload @section Autoloading @findex autoload @@ -17889,7 +17753,7 @@ @xref{Autoload, , Autoload, elisp, The GNU Emacs Lisp Reference Manual}, for more information. -@node Simple Extension, X11 Colors, Autoload, Emacs Initialization +@node Simple Extension @section A Simple Extension: @code{line-to-top-of-window} @findex line-to-top-of-window @cindex Simple extension in @file{.emacs} file @@ -18001,7 +17865,7 @@ @end group @end smallexample -@node X11 Colors, Miscellaneous, Simple Extension, Emacs Initialization +@node X11 Colors @section X11 Colors You can specify colors when you use Emacs with the MIT X Windowing @@ -18079,7 +17943,7 @@ @end smallexample @need 1700 -@node Miscellaneous, Mode Line, X11 Colors, Emacs Initialization +@node Miscellaneous @section Miscellaneous Settings for a @file{.emacs} File @need 1250 @@ -18271,7 +18135,7 @@ @end smallexample @need 1700 -@node Mode Line, , Miscellaneous, Emacs Initialization +@node Mode Line @section A Modified Mode Line @vindex mode-line-format @cindex Mode line format @@ -18434,7 +18298,7 @@ @file{~/.emacs} initialization file. A plain, default Emacs. Nothing more. -@node Debugging, Conclusion, Emacs Initialization, Top +@node Debugging @chapter Debugging @cindex debugging @@ -18454,7 +18318,7 @@ * Debugging Exercises:: @end menu -@node debug, debug-on-entry, Debugging, Debugging +@node debug @section @code{debug} @findex debug @@ -18581,7 +18445,7 @@ You can correct the mistake, re-evaluate the function definition, and then run your test again. -@node debug-on-entry, debug-on-quit, debug, Debugging +@node debug-on-entry @section @code{debug-on-entry} @findex debug-on-entry @@ -18720,7 +18584,7 @@ @noindent (If you are reading this in Info, cancel @code{debug-on-entry} now.) -@node debug-on-quit, edebug, debug-on-entry, Debugging +@node debug-on-quit @section @code{debug-on-quit} and @code{(debug)} In addition to setting @code{debug-on-error} or calling @code{debug-on-entry}, @@ -18752,7 +18616,7 @@ The @code{debug} function is described in detail in @ref{Debugger, , The Lisp Debugger, elisp, The GNU Emacs Lisp Reference Manual}. -@node edebug, Debugging Exercises, debug-on-quit, Debugging +@node edebug @section The @code{edebug} Source Level Debugger @cindex Source level debugger @findex edebug @@ -18895,7 +18759,7 @@ Lisp Reference Manual}. @need 1500 -@node Debugging Exercises, , edebug, Debugging +@node Debugging Exercises @section Debugging Exercises @itemize @bullet @@ -18940,7 +18804,7 @@ stopping point. @end itemize -@node Conclusion, the-the, Debugging, Top +@node Conclusion @chapter Conclusion We have now reached the end of this Introduction. You have now @@ -19060,7 +18924,7 @@ @c ================ Appendix ================ -@node the-the, Kill Ring, Conclusion, Top +@node the-the @appendix The @code{the-the} Function @findex the-the @cindex Duplicated words function @@ -19157,7 +19021,7 @@ You can substitute the other regular expressions shown above in the function definition and try each of them on this list. -@node Kill Ring, Full Graph, the-the, Top +@node Kill Ring @appendix Handling the Kill Ring @cindex Kill ring handling @cindex Handling the kill ring @@ -19179,8 +19043,8 @@ * ring file:: @end menu -@node What the Kill Ring Does, current-kill, Kill Ring, Kill Ring @ifnottex +@node What the Kill Ring Does @unnumberedsec What the Kill Ring Does @end ifnottex @@ -19254,8 +19118,7 @@ (setq kill-ring-max old-kill-ring-max) @end smallexample -@node current-kill, yank, What the Kill Ring Does, Kill Ring -@comment node-name, next, previous, up +@node current-kill @appendixsec The @code{current-kill} Function @findex current-kill @@ -19272,8 +19135,8 @@ * Understanding current-kill:: @end menu -@node Code for current-kill, Understanding current-kill, current-kill, current-kill @ifnottex +@node Code for current-kill @unnumberedsubsec The code for @code{current-kill} @end ifnottex @@ -19333,8 +19196,8 @@ (setq kill-ring-yank-pointer kill-ring) @end smallexample -@node Understanding current-kill, , Code for current-kill, current-kill @ifnottex +@node Understanding current-kill @unnumberedsubsec @code{current-kill} in Outline @end ifnottex @@ -19360,8 +19223,8 @@ * Determining the Element:: @end menu -@node Body of current-kill, Digression concerning error, Understanding current-kill, Understanding current-kill @ifnottex +@node Body of current-kill @unnumberedsubsubsec The Body of @code{current-kill} @end ifnottex @@ -19443,8 +19306,8 @@ list. Finally, another expression returns the first element of the list even if the @code{do-not-move} argument is true. -@node Digression concerning error, Determining the Element, Body of current-kill, Understanding current-kill @ifnottex +@node Digression concerning error @unnumberedsubsubsec Digression about the word `error' @end ifnottex @@ -19465,8 +19328,8 @@ takes the same steps as it does when there is an `error', a term such as `cancel' would have a clearer connotation. -@node Determining the Element, , Digression concerning error, Understanding current-kill @ifnottex +@node Determining the Element @unnumberedsubsubsec Determining the Element @end ifnottex @@ -19603,8 +19466,7 @@ @ref{defun, , The @code{defun} Special Form}.) @end ignore -@node yank, yank-pop, current-kill, Kill Ring -@comment node-name, next, previous, up +@node yank @appendixsec @code{yank} @findex yank @@ -19689,8 +19551,7 @@ The last part of the function tells what to do when it succeeds. -@node yank-pop, ring file, yank, Kill Ring -@comment node-name, next, previous, up +@node yank-pop @appendixsec @code{yank-pop} @findex yank-pop @@ -19760,8 +19621,7 @@ There is more, but that is the hardest part. -@node ring file, , yank-pop, Kill Ring -@comment node-name, next, previous, up +@node ring file @appendixsec The @file{ring.el} File @cindex @file{ring.el} file @@ -19770,7 +19630,7 @@ as @code{kill-ring-yank-pointer} do not use this library, possibly because they were written earlier. -@node Full Graph, Free Software and Free Manuals, Kill Ring, Top +@node Full Graph @appendix A Graph with Labeled Axes Printed axes help you understand a graph. They convey scale. In an @@ -19787,8 +19647,8 @@ * Print Whole Graph:: The function to print a complete graph. @end menu -@node Labeled Example, print-graph Varlist, Full Graph, Full Graph @ifnottex +@node Labeled Example @unnumberedsec Labeled Example Graph @end ifnottex @@ -19875,8 +19735,7 @@ We can work on each part of the @code{print-graph} function definition in turn. -@node print-graph Varlist, print-Y-axis, Labeled Example, Full Graph -@comment node-name, next, previous, up +@node print-graph Varlist @appendixsec The @code{print-graph} Varlist @cindex @code{print-graph} varlist @@ -19917,8 +19776,7 @@ As we shall see, this expression is not quite right. @need 2000 -@node print-Y-axis, print-X-axis, print-graph Varlist, Full Graph -@comment node-name, next, previous, up +@node print-Y-axis @appendixsec The @code{print-Y-axis} Function @cindex Axis, print vertical @cindex Y axis printing @@ -19956,8 +19814,8 @@ * print-Y-axis Penultimate:: A not quite final version. @end menu -@node print-Y-axis in Detail, Height of label, print-Y-axis, print-Y-axis @ifnottex +@node print-Y-axis in Detail @unnumberedsubsec The @code{print-Y-axis} Function in Detail @end ifnottex @@ -19972,8 +19830,8 @@ the fifth line from the bottom and on every line that is a multiple of five. -@node Height of label, Compute a Remainder, print-Y-axis in Detail, print-Y-axis @ifnottex +@node Height of label @unnumberedsubsec What height should the label be? @end ifnottex @@ -20010,7 +19868,7 @@ once, with a remainder of two. However, five goes into ten twice, with no remainder: ten is an integral multiple of five. -@node Compute a Remainder, Y Axis Element, Height of label, print-Y-axis +@node Compute a Remainder @appendixsubsec Side Trip: Compute a Remainder @findex % @r{(remainder function)} @@ -20144,7 +20002,7 @@ final value. @xref{fwd-para let, , The @code{let*} expression}, for more about @code{let*}.) -@node Y Axis Element, Y-axis-column, Compute a Remainder, print-Y-axis +@node Y Axis Element @appendixsubsec Construct a Y Axis Element When we print the vertical axis, we want to insert strings such as @@ -20250,7 +20108,7 @@ expression, to convert the number to a string that is concatenated with the leading spaces and the tic mark. -@node Y-axis-column, print-Y-axis Penultimate, Y Axis Element, print-Y-axis +@node Y-axis-column @appendixsubsec Create a Y Axis Column The preceding functions provide all the tools needed to construct a @@ -20297,7 +20155,7 @@ consists of the number one followed by a tic mark. @need 2000 -@node print-Y-axis Penultimate, , Y-axis-column, print-Y-axis +@node print-Y-axis Penultimate @appendixsubsec The Not Quite Final Version of @code{print-Y-axis} The list constructed by the @code{Y-axis-column} function is passed to @@ -20373,7 +20231,7 @@ thereby getting rid of what might appear as a bug.) @need 2000 -@node print-X-axis, Print Whole Graph, print-Y-axis, Full Graph +@node print-X-axis @appendixsec The @code{print-X-axis} Function @cindex Axis, print horizontal @cindex X axis printing @@ -20409,8 +20267,8 @@ * X Axis Tic Marks:: Create tic marks for the horizontal axis. @end menu -@node Similarities differences, X Axis Tic Marks, print-X-axis, print-X-axis @ifnottex +@node Similarities differences @unnumberedsubsec Similarities and differences @end ifnottex @@ -20435,7 +20293,7 @@ @code{print-X-axis-numbered-line}. @end enumerate -@node X Axis Tic Marks, , Similarities differences, print-X-axis +@node X Axis Tic Marks @appendixsubsec X Axis Tic Marks The first function should print the X axis tic marks. We must specify @@ -20724,7 +20582,7 @@ @end group @end smallexample -@node Print Whole Graph, , print-X-axis, Full Graph +@node Print Whole Graph @appendixsec Printing the Whole Graph @cindex Printing the whole graph @cindex Whole graph printing @@ -20763,8 +20621,8 @@ * Final printed graph:: The graph itself! @end menu -@node The final version, Test print-graph, Print Whole Graph, Print Whole Graph @ifnottex +@node The final version @unnumberedsubsec Changes for the Final Version @end ifnottex @@ -20915,7 +20773,7 @@ @end group @end smallexample -@node Test print-graph, Graphing words in defuns, The final version, Print Whole Graph +@node Test print-graph @appendixsubsec Testing @code{print-graph} @need 1250 @@ -21005,7 +20863,7 @@ feature? If you think it is a bug, and should be a `1' instead, (or even a `0'), you can modify the sources.) -@node Graphing words in defuns, lambda, Test print-graph, Print Whole Graph +@node Graphing words in defuns @appendixsubsec Graphing Numbers of Words and Symbols Now for the graph for which all this code was written: a graph that @@ -21093,7 +20951,7 @@ @end group @end smallexample -@node lambda, mapcar, Graphing words in defuns, Print Whole Graph +@node lambda @appendixsubsec A @code{lambda} Expression: Useful Anonymity @cindex Anonymous function @findex lambda @@ -21259,7 +21117,7 @@ Lisp Reference Manual}, for more about @code{lambda}. Lisp and lambda expressions derive from the Lambda Calculus. -@node mapcar, Another Bug, lambda, Print Whole Graph +@node mapcar @appendixsubsec The @code{mapcar} Function @findex mapcar @@ -21343,7 +21201,7 @@ 50 defuns had that many words or symbols---but not necessarily meaning that none had that many words or symbols.) -@node Another Bug, Final printed graph, mapcar, Print Whole Graph +@node Another Bug @appendixsubsec Another Bug @dots{} Most Insidious @cindex Bug, most insidious type @cindex Insidious type of bug @@ -22040,7 +21898,7 @@ @end ignore @page -@node Final printed graph, , Another Bug, Print Whole Graph +@node Final printed graph @appendixsubsec The Printed Graph When made and installed, you can call the @code{print-graph} command @@ -22090,7 +21948,7 @@ @noindent The largest group of functions contain 10 -- 19 words and symbols each. -@node Free Software and Free Manuals, GNU Free Documentation License, Full Graph, Top +@node Free Software and Free Manuals @appendix Free Software and Free Manuals @strong{by Richard M. Stallman} @@ -22210,14 +22068,13 @@ that lists free books available from other publishers:@* @uref{http://www.gnu.org/doc/other-free-books.html} -@node GNU Free Documentation License, Index, Free Software and Free Manuals, Top +@node GNU Free Documentation License @appendix GNU Free Documentation License @cindex FDL, GNU Free Documentation License @include doclicense.texi -@node Index, About the Author, GNU Free Documentation License, Top -@comment node-name, next, previous, up +@node Index @unnumbered Index @ignore @@ -22256,7 +22113,7 @@ @end iftex @ifnottex -@node About the Author, , Index, Top +@node About the Author @unnumbered About the Author @end ifnottex ------------------------------------------------------------ revno: 108411 fixes bug(s): http://debbugs.gnu.org/10910 committer: Glenn Morris branch nick: trunk timestamp: Mon 2012-05-28 16:35:09 -0700 message: * emacs/ack.texi, emacs/building.texi, emacs/calendar.texi * emacs/custom.texi, emacs/maintaining.texi, emacs/text.texi: * misc/calc.texi, misc/dired-x.texi: Use @LaTeX rather than La@TeX. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2012-05-27 02:13:54 +0000 +++ doc/emacs/ChangeLog 2012-05-28 23:35:09 +0000 @@ -1,3 +1,8 @@ +2012-05-28 Glenn Morris + + * ack.texi, building.texi, calendar.texi, custom.texi: + * maintaining.texi, text.texi: Use @LaTeX rather than La@TeX. + 2012-05-27 Glenn Morris * emacs.texi: Simplify following removal of node pointers. === modified file 'doc/emacs/ack.texi' --- doc/emacs/ack.texi 2012-05-27 01:25:06 +0000 +++ doc/emacs/ack.texi 2012-05-28 23:35:09 +0000 @@ -264,7 +264,7 @@ @item Carsten Dominik wrote Ref@TeX{}, a package for setting up labels and -cross-references in La@TeX{} documents; and co-wrote IDLWAVE mode +cross-references in @LaTeX{} documents; and co-wrote IDLWAVE mode (q.v.@:). He was the original author of Org mode, for maintaining notes, todo lists, and project planning. Bastien Guerry subsequently took over maintainership. Benjamin Andresen, Thomas Baumann, Joel Boehland, Jan Böcker, Lennart @@ -549,7 +549,7 @@ @item Arne Jørgensen wrote @file{latexenc.el}, a package to -automatically guess the correct coding system in La@TeX{} files. +automatically guess the correct coding system in @LaTeX{} files. @item Alexandre Julliard wrote @file{vc-git.el}, support for the Git version @@ -567,7 +567,7 @@ Henry Kautz wrote @file{bib-mode.el}, a mode for maintaining bibliography databases compatible with @code{refer} (the @code{troff} version) and @code{lookbib}, and @file{refbib.el}, a package to convert -those databases to the format used by the La@TeX{} text formatting package. +those databases to the format used by the @LaTeX{} text formatting package. @item Taichi Kawabata added support for Devanagari script and the Indian === modified file 'doc/emacs/building.texi' --- doc/emacs/building.texi 2012-05-27 01:25:06 +0000 +++ doc/emacs/building.texi 2012-05-28 23:35:09 +0000 @@ -416,7 +416,7 @@ Flymake mode is a minor mode that performs on-the-fly syntax checking for many programming and markup languages, including C, C++, -Perl, HTML, and @TeX{}/La@TeX{}. It is somewhat analogous to Flyspell +Perl, HTML, and @TeX{}/@LaTeX{}. It is somewhat analogous to Flyspell mode, which performs spell checking for ordinary human languages in a similar fashion (@pxref{Spelling}). As you edit a file, Flymake mode runs an appropriate syntax checking tool in the background, using a === modified file 'doc/emacs/calendar.texi' --- doc/emacs/calendar.texi 2012-05-09 03:06:08 +0000 +++ doc/emacs/calendar.texi 2012-05-28 23:35:09 +0000 @@ -345,7 +345,7 @@ @node Writing Calendar Files @section Writing Calendar Files - You can write calendars and diary entries to HTML and La@TeX{} files. + You can write calendars and diary entries to HTML and @LaTeX{} files. @cindex calendar and HTML The Calendar HTML commands produce files of HTML code that contain @@ -380,8 +380,8 @@ number. The variable @code{cal-html-year-index-cols} specifies the number of columns in the yearly index page. -@cindex calendar and La@TeX{} - The Calendar La@TeX{} commands produce a buffer of La@TeX{} code that +@cindex calendar and @LaTeX{} + The Calendar @LaTeX{} commands produce a buffer of @LaTeX{} code that prints as a calendar. Depending on the command you use, the printed calendar covers the day, week, month or year that point is in. @@ -441,7 +441,7 @@ features. You can use the variable @code{cal-tex-preamble-extra} to insert extra -La@TeX{} commands in the preamble of the generated document if you need +@LaTeX{} commands in the preamble of the generated document if you need to. @node Holidays === modified file 'doc/emacs/custom.texi' --- doc/emacs/custom.texi 2012-05-09 03:06:08 +0000 +++ doc/emacs/custom.texi 2012-05-28 23:35:09 +0000 @@ -866,7 +866,7 @@ @noindent This works by calling @code{auto-fill-mode}, which enables the minor mode when no argument is supplied (@pxref{Minor Modes}). Next, -suppose you don't want Auto Fill mode turned on in La@TeX{} mode, +suppose you don't want Auto Fill mode turned on in @LaTeX{} mode, which is one of the modes based on Text mode. You can do this with the following additional line: @@ -878,7 +878,7 @@ Here we have used the special macro @code{lambda} to construct an anonymous function (@pxref{Lambda Expressions,,, elisp, The Emacs Lisp Reference Manual}), which calls @code{auto-fill-mode} with an argument -of @code{-1} to disable the minor mode. Because La@TeX{} mode runs +of @code{-1} to disable the minor mode. Because @LaTeX{} mode runs @code{latex-mode-hook} after running @code{text-mode-hook}, the result leaves Auto Fill mode disabled. === modified file 'doc/emacs/maintaining.texi' --- doc/emacs/maintaining.texi 2012-05-27 01:25:06 +0000 +++ doc/emacs/maintaining.texi 2012-05-28 23:35:09 +0000 @@ -1659,7 +1659,7 @@ @samp{@var{class}.@var{variable}} and @samp{@var{class}.@var{function}}. @item -In La@TeX{} documents, the arguments for @code{\chapter}, +In @LaTeX{} documents, the arguments for @code{\chapter}, @code{\section}, @code{\subsection}, @code{\subsubsection}, @code{\eqno}, @code{\label}, @code{\ref}, @code{\cite}, @code{\bibitem}, @code{\part}, @code{\appendix}, @code{\entry}, === modified file 'doc/emacs/text.texi' --- doc/emacs/text.texi 2012-05-27 01:25:06 +0000 +++ doc/emacs/text.texi 2012-05-28 23:35:09 +0000 @@ -34,7 +34,7 @@ @cindex mode, nXML @findex nxml-mode Emacs has other major modes for text which contains ``embedded'' -commands, such as @TeX{} and La@TeX{} (@pxref{TeX Mode}); HTML and +commands, such as @TeX{} and @LaTeX{} (@pxref{TeX Mode}); HTML and SGML (@pxref{HTML Mode}); XML @ifinfo (@pxref{Top,The nXML Mode Manual,,nxml-mode, nXML Mode}); @@ -1372,7 +1372,7 @@ export and publication. To export the current buffer, type @kbd{C-c C-e} (@code{org-export}) anywhere in an Org buffer. This command prompts for an export format; currently supported formats include -HTML, La@TeX{}, OpenDocument (@file{.odt}), and PDF. Some formats, +HTML, @LaTeX{}, OpenDocument (@file{.odt}), and PDF. Some formats, such as PDF, require certain system tools to be installed. @vindex org-publish-project-alist @@ -1405,11 +1405,11 @@ @node TeX Mode @section @TeX{} Mode @cindex @TeX{} mode -@cindex La@TeX{} mode +@cindex @LaTeX{} mode @cindex Sli@TeX{} mode @cindex Doc@TeX{} mode @cindex mode, @TeX{} -@cindex mode, La@TeX{} +@cindex mode, @LaTeX{} @cindex mode, Sli@TeX{} @cindex mode, Doc@TeX{} @findex tex-mode @@ -1422,15 +1422,15 @@ Emacs provides special major modes for editing files written in @TeX{} and its related formats. @TeX{} is a powerful text formatter written by Donald Knuth; like GNU Emacs, it is free software. -La@TeX{} is a simplified input format for @TeX{}, implemented using +@LaTeX{} is a simplified input format for @TeX{}, implemented using @TeX{} macros. Doc@TeX{} is a special file format in which the -La@TeX{} sources are written, combining sources with documentation. -Sli@TeX{} is an obsolete special form of La@TeX{}.@footnote{It has +@LaTeX{} sources are written, combining sources with documentation. +Sli@TeX{} is an obsolete special form of @LaTeX{}.@footnote{It has been replaced by the @samp{slides} document class, which comes with -La@TeX{}.} +@LaTeX{}.} @vindex tex-default-mode - @TeX{} mode has four variants: Plain @TeX{} mode, La@TeX{} mode, + @TeX{} mode has four variants: Plain @TeX{} mode, @LaTeX{} mode, Doc@TeX{} mode, and Sli@TeX{} mode. These distinct major modes differ only slightly, and are designed for editing the four different formats. Emacs selects the appropriate mode by looking at the @@ -1450,13 +1450,13 @@ @itemize @bullet @item Bib@TeX{} mode is a major mode for Bib@TeX{} files, which are commonly -used for keeping bibliographic references for La@TeX{} documents. For +used for keeping bibliographic references for @LaTeX{} documents. For more information, see the documentation string for the command @code{bibtex-mode}. @item The Ref@TeX{} package provides a minor mode which can be used with -La@TeX{} mode to manage bibliographic references. +@LaTeX{} mode to manage bibliographic references. @ifinfo @xref{Top,The Ref@TeX{} Manual,,reftex}. @end ifinfo @@ -1561,23 +1561,23 @@ to work with them. @node LaTeX Editing -@subsection La@TeX{} Editing Commands +@subsection @LaTeX{} Editing Commands - La@TeX{} mode provides a few extra features not applicable to plain + @LaTeX{} mode provides a few extra features not applicable to plain @TeX{}: @table @kbd @item C-c C-o -Insert @samp{\begin} and @samp{\end} for La@TeX{} block and position +Insert @samp{\begin} and @samp{\end} for @LaTeX{} block and position point on a line between them (@code{tex-latex-block}). @item C-c C-e -Close the innermost La@TeX{} block not yet closed +Close the innermost @LaTeX{} block not yet closed (@code{tex-close-latex-block}). @end table @findex tex-latex-block -@kindex C-c C-o @r{(La@TeX{} mode)} - In La@TeX{} input, @samp{\begin} and @samp{\end} tags are used to +@kindex C-c C-o @r{(@LaTeX{} mode)} + In @LaTeX{} input, @samp{\begin} and @samp{\end} tags are used to group blocks of text. To insert a block, type @kbd{C-c C-o} (@code{tex-latex-block}). This prompts for a block type, and inserts the appropriate matching @samp{\begin} and @samp{\end} tags, leaving a @@ -1586,14 +1586,14 @@ @vindex latex-block-names When entering the block type argument to @kbd{C-c C-o}, you can use the usual completion commands (@pxref{Completion}). The default -completion list contains the standard La@TeX{} block types. If you +completion list contains the standard @LaTeX{} block types. If you want additional block types for completion, customize the list variable @code{latex-block-names}. @findex tex-close-latex-block -@kindex C-c C-e @r{(La@TeX{} mode)} +@kindex C-c C-e @r{(@LaTeX{} mode)} @findex latex-electric-env-pair-mode - In La@TeX{} input, @samp{\begin} and @samp{\end} tags must balance. + In @LaTeX{} input, @samp{\begin} and @samp{\end} tags must balance. You can use @kbd{C-c C-e} (@code{tex-close-latex-block}) to insert an @samp{\end} tag which matches the last unmatched @samp{\begin}. It also indents the @samp{\end} to match the corresponding @samp{\begin}, @@ -1670,7 +1670,7 @@ The buffer's @TeX{} variant determines what shell command @kbd{C-c C-b} actually runs. In Plain @TeX{} mode, it is specified by the variable @code{tex-run-command}, which defaults to @code{"tex"}. In -La@TeX{} mode, it is specified by @code{latex-run-command}, which +@LaTeX{} mode, it is specified by @code{latex-run-command}, which defaults to @code{"latex"}. The shell command that @kbd{C-c C-v} runs to view the @file{.dvi} output is determined by the variable @code{tex-dvi-view-command}, regardless of the @TeX{} variant. The @@ -1725,9 +1725,9 @@ If @samp{%**start of header} does not appear within the first 100 lines of the buffer, @kbd{C-c C-r} assumes that there is no header. - In La@TeX{} mode, the header begins with @samp{\documentclass} or + In @LaTeX{} mode, the header begins with @samp{\documentclass} or @samp{\documentstyle} and ends with @samp{\begin@{document@}}. These -are commands that La@TeX{} requires you to use in any case, so nothing +are commands that @LaTeX{} requires you to use in any case, so nothing special needs to be done to identify the header. @findex tex-file @@ -1769,7 +1769,7 @@ @findex tex-bibtex-file @kindex C-c TAB @r{(@TeX{} mode)} @vindex tex-bibtex-command - For La@TeX{} files, you can use Bib@TeX{} to process the auxiliary + For @LaTeX{} files, you can use Bib@TeX{} to process the auxiliary file for the current buffer's file. Bib@TeX{} looks up bibliographic citations in a data base and prepares the cited references for the bibliography section. The command @kbd{C-c @key{TAB}} === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2012-05-28 23:28:27 +0000 +++ doc/misc/ChangeLog 2012-05-28 23:35:09 +0000 @@ -1,5 +1,7 @@ 2012-05-28 Glenn Morris + * calc.texi, dired-x.texi: Use @LaTeX rather than La@TeX. (Bug#10910) + * sc.texi: Nuke hand-written node pointers. Fix top-level menu to match actual node order. === modified file 'doc/misc/calc.texi' --- doc/misc/calc.texi 2012-05-19 03:00:48 +0000 +++ doc/misc/calc.texi 2012-05-28 23:35:09 +0000 @@ -557,7 +557,7 @@ Type @kbd{d B} to view the solutions in more readable notation. Type @w{@kbd{d C}} to view them in C language notation, @kbd{d T} to view them in the notation for the @TeX{} typesetting system, -and @kbd{d L} to view them in the notation for the La@TeX{} typesetting +and @kbd{d L} to view them in the notation for the @LaTeX{} typesetting system. Type @kbd{d N} to return to normal notation. @noindent @@ -939,7 +939,7 @@ Calc has added annotations to the file to help it remember the modes that were used for this formula. They are formatted like comments in the @TeX{} typesetting language, just in case you are using @TeX{} or -La@TeX{}. (In this example @TeX{} is not being used, so you might want +@LaTeX{}. (In this example @TeX{} is not being used, so you might want to move these comments up to the top of the file or otherwise put them out of the way.) @@ -5026,7 +5026,7 @@ Here things like powers, square roots, and quotients and fractions are displayed in a two-dimensional pictorial form. Calc has other language modes as well, such as C mode, FORTRAN mode, @TeX{} mode -and La@TeX{} mode. +and @LaTeX{} mode. @smallexample @group @@ -13842,7 +13842,7 @@ @noindent The commands in this section change Calc to use a different notation for entry and display of formulas, corresponding to the conventions of some -other common language such as Pascal or La@TeX{}. Objects displayed on the +other common language such as Pascal or @LaTeX{}. Objects displayed on the stack or yanked from the Calculator to an editing buffer will be formatted in the current language; objects entered in algebraic entry or yanked from another buffer will be interpreted according to the current language. @@ -13867,10 +13867,10 @@ and would have written the formula back with notations (like implicit multiplication) which would not have been valid for a C program. -As another example, suppose you are maintaining a C program and a La@TeX{} +As another example, suppose you are maintaining a C program and a @LaTeX{} document, each of which needs a copy of the same formula. You can grab the -formula from the program in C mode, switch to La@TeX{} mode, and yank the -formula into the document in La@TeX{} math-mode format. +formula from the program in C mode, switch to @LaTeX{} mode, and yank the +formula into the document in @LaTeX{} math-mode format. Language modes are selected by typing the letter @kbd{d} followed by a shifted letter key. @@ -14067,7 +14067,7 @@ convert to lower-case for display and input. @node TeX and LaTeX Language Modes, Eqn Language Mode, C FORTRAN Pascal, Language Modes -@subsection @TeX{} and La@TeX{} Language Modes +@subsection @TeX{} and @LaTeX{} Language Modes @noindent @kindex d T @@ -14079,38 +14079,38 @@ The @kbd{d T} (@code{calc-tex-language}) command selects the conventions of ``math mode'' in Donald Knuth's @TeX{} typesetting language, and the @kbd{d L} (@code{calc-latex-language}) command selects the -conventions of ``math mode'' in La@TeX{}, a typesetting language that -uses @TeX{} as its formatting engine. Calc's La@TeX{} language mode can -read any formula that the @TeX{} language mode can, although La@TeX{} +conventions of ``math mode'' in @LaTeX{}, a typesetting language that +uses @TeX{} as its formatting engine. Calc's @LaTeX{} language mode can +read any formula that the @TeX{} language mode can, although @LaTeX{} mode may display it differently. Formulas are entered and displayed in the appropriate notation; @texline @math{\sin(a/b)} @infoline @expr{sin(a/b)} will appear as @samp{\sin\left( @{a \over b@} \right)} in @TeX{} mode and -@samp{\sin\left(\frac@{a@}@{b@}\right)} in La@TeX{} mode. +@samp{\sin\left(\frac@{a@}@{b@}\right)} in @LaTeX{} mode. Math formulas are often enclosed by @samp{$ $} signs in @TeX{} and -La@TeX{}; these should be omitted when interfacing with Calc. To Calc, +@LaTeX{}; these should be omitted when interfacing with Calc. To Calc, the @samp{$} sign has the same meaning it always does in algebraic formulas (a reference to an existing entry on the stack). Complex numbers are displayed as in @samp{3 + 4i}. Fractions and quotients are written using @code{\over} in @TeX{} mode (as in -@code{@{a \over b@}}) and @code{\frac} in La@TeX{} mode (as in +@code{@{a \over b@}}) and @code{\frac} in @LaTeX{} mode (as in @code{\frac@{a@}@{b@}}); binomial coefficients are written with @code{\choose} in @TeX{} mode (as in @code{@{a \choose b@}}) and -@code{\binom} in La@TeX{} mode (as in @code{\binom@{a@}@{b@}}). +@code{\binom} in @LaTeX{} mode (as in @code{\binom@{a@}@{b@}}). Interval forms are written with @code{\ldots}, and error forms are written with @code{\pm}. Absolute values are written as in @samp{|x + 1|}, and the floor and ceiling functions are written with @code{\lfloor}, @code{\rfloor}, etc. The words @code{\left} and -@code{\right} are ignored when reading formulas in @TeX{} and La@TeX{} +@code{\right} are ignored when reading formulas in @TeX{} and @LaTeX{} modes. Both @code{inf} and @code{uinf} are written as @code{\infty}; when read, @code{\infty} always translates to @code{inf}. Function calls are written the usual way, with the function name followed by the arguments in parentheses. However, functions for which @TeX{} -and La@TeX{} have special names (like @code{\sin}) will use curly braces +and @LaTeX{} have special names (like @code{\sin}) will use curly braces instead of parentheses for very simple arguments. During input, curly braces and parentheses work equally well for grouping, but when the document is formatted the curly braces will be invisible. Thus the @@ -14125,14 +14125,14 @@ the @samp{tex} prefix; the unit name for a @TeX{} point will be @samp{pt} instead of @samp{texpt}, for example. -Function and variable names not treated specially by @TeX{} and La@TeX{} +Function and variable names not treated specially by @TeX{} and @LaTeX{} are simply written out as-is, which will cause them to come out in italic letters in the printed document. If you invoke @kbd{d T} or @kbd{d L} with a positive numeric prefix argument, names of more than one character will instead be enclosed in a protective commands that will prevent them from being typeset in the math italics; they will be written @samp{\hbox@{@var{name}@}} in @TeX{} mode and -@samp{\text@{@var{name}@}} in La@TeX{} mode. The +@samp{\text@{@var{name}@}} in @LaTeX{} mode. The @samp{\hbox@{ @}} and @samp{\text@{ @}} notations are ignored during reading. If you use a negative prefix argument, such function names are written @samp{\@var{name}}, and function names that begin with @code{\} during @@ -14143,7 +14143,7 @@ During reading, text of the form @samp{\matrix@{ ...@: @}} is replaced by @samp{[ ...@: ]}. The same also applies to @code{\pmatrix} and -@code{\bmatrix}. In La@TeX{} mode this also applies to +@code{\bmatrix}. In @LaTeX{} mode this also applies to @samp{\begin@{matrix@} ... \end@{matrix@}}, @samp{\begin@{bmatrix@} ... \end@{bmatrix@}}, @samp{\begin@{pmatrix@} ... \end@{pmatrix@}}, as well as @@ -14153,7 +14153,7 @@ During output, matrices are displayed in @samp{\matrix@{ a & b \\ c & d@}} format in @TeX{} mode and in @samp{\begin@{pmatrix@} a & b \\ c & d \end@{pmatrix@}} format in -La@TeX{} mode; you may need to edit this afterwards to change to your +@LaTeX{} mode; you may need to edit this afterwards to change to your preferred matrix form. If you invoke @kbd{d T} or @kbd{d L} with an argument of 2 or -2, then matrices will be displayed in two-dimensional form, such as @@ -14177,7 +14177,7 @@ @end example @noindent -While this wouldn't bother Calc, it is incorrect La@TeX{}. +While this wouldn't bother Calc, it is incorrect @LaTeX{}. (Similarly for @TeX{}.) Accents like @code{\tilde} and @code{\bar} translate into function @@ -14185,7 +14185,7 @@ sequence is treated as an accent. The @code{\vec} accent corresponds to the function name @code{Vec}, because @code{vec} is the name of a built-in Calc function. The following table shows the accents -in Calc, @TeX{}, La@TeX{} and @dfn{eqn} (described in the next section): +in Calc, @TeX{}, @LaTeX{} and @dfn{eqn} (described in the next section): @ignore @iftex @@ -14362,7 +14362,7 @@ @end example Note that, because these symbols are ignored, reading a @TeX{} or -La@TeX{} formula into Calc and writing it back out may lose spacing and +@LaTeX{} formula into Calc and writing it back out may lose spacing and font information. Also, the ``discretionary multiplication sign'' @samp{\*} is read @@ -14528,7 +14528,7 @@ symbol (these are used to introduce spaces of various widths into the typeset output of @dfn{eqn}). -As in La@TeX{} mode, Calc's formatter omits parentheses around the +As in @LaTeX{} mode, Calc's formatter omits parentheses around the arguments of functions like @code{ln} and @code{sin} if they are ``simple-looking''; in this case Calc surrounds the argument with braces, separated by a @samp{~} from the function name: @samp{sin~@{x@}}. @@ -15939,7 +15939,7 @@ @TeX{} language mode (@kbd{d T}; @pxref{TeX and LaTeX Language Modes}). @item LaTeX -La@TeX{} language mode (@kbd{d L}; @pxref{TeX and LaTeX Language Modes}). +@LaTeX{} language mode (@kbd{d L}; @pxref{TeX and LaTeX Language Modes}). @item Eqn @dfn{Eqn} language mode (@kbd{d E}; @pxref{Eqn Language Mode}). @@ -28002,7 +28002,7 @@ @code{texcc} (a Cicero) and @code{texsp} (a scaled @TeX{} point, all dimensions representable in @TeX{} are multiples of this value). -When Calc is using the @TeX{} or La@TeX{} language mode (@pxref{TeX +When Calc is using the @TeX{} or @LaTeX{} language mode (@pxref{TeX and LaTeX Language Modes}), the @TeX{} specific unit names will not use the @samp{tex} prefix; the unit name for a @TeX{} point will be @samp{pt} instead of @samp{texpt}, for example. To avoid conflicts, @@ -28911,7 +28911,7 @@ @cindex @samp{=>} operator The special algebraic symbol @samp{=>} is known as the @dfn{evaluates-to operator}. (It will show up as an @code{evalto} function call in -other language modes like Pascal and La@TeX{}.) This is a binary +other language modes like Pascal and @LaTeX{}.) This is a binary operator, that is, it has a lefthand and a righthand argument, although it can be entered with the righthand argument omitted. @@ -30490,7 +30490,7 @@ Calc will try to guess an appropriate language based on the major mode of the editing buffer. (@xref{Language Modes}.) If the current buffer is -in @code{latex-mode}, for example, Calc will set its language to La@TeX{}. +in @code{latex-mode}, for example, Calc will set its language to @LaTeX{}. Similarly, Calc will use @TeX{} language for @code{tex-mode}, @code{plain-tex-mode} and @code{context-mode}, C language for @code{c-mode} and @code{c++-mode}, FORTRAN language for @@ -30507,7 +30507,7 @@ @enumerate @item -The @TeX{} and La@TeX{} math delimiters @samp{$ $}, @samp{$$ $$}, +The @TeX{} and @LaTeX{} math delimiters @samp{$ $}, @samp{$$ $$}, @samp{\[ \]}, and @samp{\( \)}; @item Lines beginning with @samp{\begin} and @samp{\end} (except matrix delimiters); @@ -30647,14 +30647,14 @@ When Embedded mode ``activates'' a formula, i.e., when it examines the formula for the first time since the buffer was created or loaded, Calc tries to sense the language in which the formula was -written. If the formula contains any La@TeX{}-like @samp{\} sequences, -it is parsed (i.e., read) in La@TeX{} mode. If the formula appears to +written. If the formula contains any @LaTeX{}-like @samp{\} sequences, +it is parsed (i.e., read) in @LaTeX{} mode. If the formula appears to be written in multi-line Big mode, it is parsed in Big mode. Otherwise, it is parsed according to the current language mode. Note that Calc does not change the current language mode according -the formula it reads in. Even though it can read a La@TeX{} formula when -not in La@TeX{} mode, it will immediately rewrite this formula using +the formula it reads in. Even though it can read a @LaTeX{} formula when +not in @LaTeX{} mode, it will immediately rewrite this formula using whatever language mode is in effect. @tex @@ -30675,8 +30675,8 @@ Plain formulas are preceded and followed by @samp{%%%} signs by default. This notation has the advantage that the @samp{%} -character begins a comment in @TeX{} and La@TeX{}, so if your formula is -embedded in a @TeX{} or La@TeX{} document its plain version will be +character begins a comment in @TeX{} and @LaTeX{}, so if your formula is +embedded in a @TeX{} or @LaTeX{} document its plain version will be invisible in the final printed copy. Certain major modes have different delimiters to ensure that the ``plain'' version will be in a comment for those modes, also. @@ -30962,7 +30962,7 @@ @noindent where the leading and trailing @samp{---} can be replaced by any suitable strings (which must be the same on all three lines) -or omitted altogether; in a @TeX{} or La@TeX{} file, @samp{%} would be a good +or omitted altogether; in a @TeX{} or @LaTeX{} file, @samp{%} would be a good leading string and no trailing string would be necessary. In a C program, @samp{/*} and @samp{*/} would be good leading and trailing strings. @@ -35392,7 +35392,7 @@ Embedded mode understands by default are: @enumerate @item -The @TeX{} and La@TeX{} math delimiters @samp{$ $}, @samp{$$ $$}, +The @TeX{} and @LaTeX{} math delimiters @samp{$ $}, @samp{$$ $$}, @samp{\[ \]}, and @samp{\( \)}; @item Lines beginning with @samp{\begin} and @samp{\end} (except matrix delimiters); === modified file 'doc/misc/dired-x.texi' --- doc/misc/dired-x.texi 2012-05-27 02:30:29 +0000 +++ doc/misc/dired-x.texi 2012-05-28 23:35:09 +0000 @@ -429,7 +429,7 @@ @cindex Tib files, how to omit them in Dired @cindex Omitting tib files in Dired If you use @code{tib}, the bibliography program for use with @TeX{} and -La@TeX{}, and you +@LaTeX{}, and you want to omit the @file{INDEX} and the @file{*-t.tex} files, then put @example @@ -741,7 +741,7 @@ @item dired-clean-tex @findex dired-clean-tex -Flag dispensable files created by @TeX{}, La@TeX{}, and @samp{texinfo} for +Flag dispensable files created by @TeX{}, @LaTeX{}, and @samp{texinfo} for deletion. See the following variables (@pxref{Advanced Cleaning Variables}): @itemize @bullet @@ -757,7 +757,7 @@ @item dired-very-clean-tex @findex dired-very-clean-tex -Flag dispensable files created by @TeX{}, La@TeX{}, @samp{texinfo}, +Flag dispensable files created by @TeX{}, @LaTeX{}, @samp{texinfo}, and @file{*.dvi} files for deletion. @end table @@ -791,7 +791,7 @@ @vindex dired-latex-unclean-extensions Default: @code{(".idx" ".lof" ".lot" ".glo")} -List of extensions of dispensable files created by La@TeX{}. +List of extensions of dispensable files created by @LaTeX{}. @item dired-bibtex-unclean-extensions @vindex dired-bibtex-unclean-extensions ------------------------------------------------------------ revno: 108410 committer: Glenn Morris branch nick: trunk timestamp: Mon 2012-05-28 16:28:27 -0700 message: * doc/misc/sc.texi: Nuke hand-written node pointers. Fix top-level menu to match actual node order. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2012-05-27 02:30:29 +0000 +++ doc/misc/ChangeLog 2012-05-28 23:28:27 +0000 @@ -1,3 +1,8 @@ +2012-05-28 Glenn Morris + + * sc.texi: Nuke hand-written node pointers. + Fix top-level menu to match actual node order. + 2012-05-27 Glenn Morris * cl.texi, dired-x.texi: Nuke hand-written node pointers. === modified file 'doc/misc/sc.texi' --- doc/misc/sc.texi 2012-02-28 08:17:21 +0000 +++ doc/misc/sc.texi 2012-05-28 23:28:27 +0000 @@ -52,9 +52,8 @@ @contents @ifnottex -@node Top, Introduction, (dir), (dir) +@node Top @top Supercite -@comment node-name, next, previous, up @insertcopying @@ -64,13 +63,13 @@ @menu * Introduction:: * Citations:: +* Information Keys and the Info Alist:: +* Reference Headers:: * Getting Connected:: * Replying and Yanking:: * Selecting an Attribution:: * Configuring the Citation Engine:: * Post-yank Formatting Commands:: -* Information Keys and the Info Alist:: -* Reference Headers:: * Hints to MUA Authors:: * Thanks and History:: @@ -83,7 +82,7 @@ @end ifnottex -@node Introduction, Usage Overview, Top, Top +@node Introduction @chapter Introduction Supercite is a GNU Emacs package written entirely in Emacs Lisp. It @@ -113,14 +112,14 @@ sent. Supercite is re-initialized in each new reply buffer. -@node Usage Overview, What Supercite Does Not Do, Introduction, Introduction +@node Usage Overview +@section Usage Overview @kindex r @kindex f @kindex C-c C-y @cindex yank @cindex cite, citing @cindex attribute, attributing -@section Usage Overview Typical usage is as follows. You want to reply or followup to a message in your MUA. You will probably hit @kbd{r} (i.e., ``reply'') or @kbd{f} @@ -138,7 +137,7 @@ using Supercite you gain a wider flexibility in the look and style of citations. Supercite's only job is to cite the original message. -@node What Supercite Does Not Do, What Supercite Does, Usage Overview, Introduction +@node What Supercite Does Not Do @section What Supercite Doesn't Do Because of this clear division of labor, there are useful features which @@ -159,9 +158,9 @@ outside the designated region. @xref{Hints to MUA Authors}, for more details.@refill -@node What Supercite Does, Citations, What Supercite Does Not Do, Introduction -@findex sc-cite-original +@node What Supercite Does @section What Supercite Does +@findex sc-cite-original Supercite is invoked for the first time on a reply buffer via your MUA's reply or forward command. This command will actually perform citations @@ -219,10 +218,10 @@ it has been properly connected to your MUA. @xref{Getting Connected}, for more details.@refill -@node Citations, Citation Elements, What Supercite Does, Top +@node Citations +@chapter Citations @cindex nested citations @cindex citation -@chapter Citations A @dfn{citation} is the acknowledgement of the original author of a mail message in the body of the reply. There are two basic citation styles @@ -284,9 +283,9 @@ are used. -@node Citation Elements, Recognizing Citations, Citations, Citations +@node Citation Elements +@section Citation Elements @cindex citation string -@section Citation Elements @dfn{Citation strings} are composed of one or more elements. Non-nested citations are composed of four elements, three of which are directly @@ -339,7 +338,7 @@ enough to not put additional spaces between citation delimiters for multi-level nested citations. -@node Recognizing Citations, Getting Connected, Citation Elements, Citations +@node Recognizing Citations @section Recognizing Citations Supercite also recognizes citations in the original article, and can @@ -383,13 +382,13 @@ change @code{sc-citation-root-regexp} you should always also change @code{sc-citation-nonnested-root-regexp}.@refill -@node Information Keys and the Info Alist, Reference Headers, Miscellaneous Commands, Top +@node Information Keys and the Info Alist +@chapter Information Keys and the Info Alist @cindex information keys @cindex Info Alist @cindex information extracted from mail fields @findex sc-mail-field @findex mail-field (sc-) -@chapter Information Keys and the Info Alist @dfn{Mail header information keys} are nuggets of information that Supercite extracts from the various mail headers of the original @@ -493,9 +492,9 @@ info keys with the appropriate index (e.g., @code{"sc-middlename-2"}, @dots{}). @xref{Selecting an Attribution}.@refill -@node Reference Headers, The Built-in Header Rewrite Functions, Information Keys and the Info Alist, Top +@node Reference Headers +@chapter Reference Headers @cindex reference headers -@chapter Reference Headers Supercite will insert an informative @dfn{reference header} at the beginning of the cited body of text, which display more detail about the @@ -534,9 +533,9 @@ integer which is an index into the @code{sc-rewrite-header-list}, beginning at zero. -@node The Built-in Header Rewrite Functions, Electric References, Reference Headers, Reference Headers +@node The Built-in Header Rewrite Functions +@section The Built-in Header Rewrite Functions @cindex header rewrite functions, built-in -@section The Built-in Header Rewrite Functions Below are examples of the various built-in header rewrite functions. Please note the following:@: first, the text which appears in the @@ -613,9 +612,9 @@ @code{>>>>> see @var{references} for more details} @end table -@node Electric References, Hints to MUA Authors, The Built-in Header Rewrite Functions, Reference Headers +@node Electric References +@section Electric References @cindex electric references -@section Electric References By default, when Supercite cites the original message for the first time, it just goes ahead and inserts the reference header indexed by @@ -709,10 +708,9 @@ Supercite will execute the hook @code{sc-electric-mode-hook} before entering electric reference mode. -@node Getting Connected, Replying and Yanking, Recognizing Citations, Top +@node Getting Connected +@chapter Getting Connected @cindex citation interface specification -@chapter Getting Connected - @vindex mail-citation-hook @cindex .emacs file @@ -791,7 +789,7 @@ get executed every time @code{sc-cite-original} is called. @xref{Reply Buffer Initialization}.@refill -@node Replying and Yanking, Reply Buffer Initialization, Getting Connected, Top +@node Replying and Yanking @chapter Replying and Yanking @ifinfo @@ -803,10 +801,10 @@ * Filling Cited Text:: @end menu @end ifinfo -@node Reply Buffer Initialization, Filling Cited Text, Replying and Yanking, Replying and Yanking -@findex sc-cite-original -@findex cite-original (sc-) +@node Reply Buffer Initialization @section Reply Buffer Initialization +@findex sc-cite-original +@findex cite-original (sc-) Executing @code{sc-cite-original} performs the following steps as it initializes the reply buffer: @@ -960,7 +958,8 @@ reset certain variables set in @code{sc-pre-hook}.@refill @end enumerate -@node Filling Cited Text, Selecting an Attribution, Reply Buffer Initialization, Replying and Yanking +@node Filling Cited Text +@section Filling Cited Text @cindex filling paragraphs @vindex sc-auto-fill-region-p @vindex auto-fill-region-p (sc-) @@ -970,7 +969,6 @@ @findex setup-filladapt (sc-) @vindex sc-load-hook @vindex load-hook (sc-) -@section Filling Cited Text Supercite will automatically fill newly cited text from the original message unless the variable @code{sc-auto-fill-region-p} has a @@ -1039,11 +1037,11 @@ containing lines greater than about 72 characters. So the default is to fill cited text. -@node Selecting an Attribution, Attribution Preferences, Filling Cited Text, Top +@node Selecting an Attribution +@chapter Selecting an Attribution @cindex attribution list @vindex sc-preferred-attribution-list @vindex preferred-attribution-list (sc-) -@chapter Selecting an Attribution As you know, the attribution string is the part of the author's name that will be used to composed a non-nested citation string. Supercite @@ -1063,7 +1061,7 @@ @end menu @end ifinfo -@node Attribution Preferences, Anonymous Attributions, Selecting an Attribution, Selecting an Attribution +@node Attribution Preferences @section Attribution Preferences When you cite an original message, you can tell Supercite which part of @@ -1165,12 +1163,12 @@ match against a specific mail field, e.g., @samp{From:@:}, allowing you to cite your friend's message with the appropriate attribution. -@node Anonymous Attributions, Author Names, Attribution Preferences, Selecting an Attribution +@node Anonymous Attributions +@section Anonymous Attributions @vindex sc-default-author-name @vindex default-author-name (sc-) @vindex sc-default-attribution @vindex default-attribution (sc-) -@section Anonymous Attributions When the author's name cannot be found in the @samp{From:@:} mail header, a fallback author name and attribution string must be supplied. @@ -1254,9 +1252,9 @@ one character long; e.g. you prefer to use @code{"initials"} but the author only has one name.@refill -@node Author Names, Configuring the Citation Engine, Anonymous Attributions, Selecting an Attribution +@node Author Names +@section Author Names @cindex author names -@section Author Names Supercite employs a number of heuristics to decipher the author's name based on value of the @samp{From:@:} mail field of the original message. @@ -1316,11 +1314,11 @@ word in the name field, while @code{any} matches against every word in the name field. -@node Configuring the Citation Engine, Using Regi, Author Names, Top +@node Configuring the Citation Engine +@chapter Configuring the Citation Engine @cindex Regi @cindex frames (Regi) @cindex entries (Regi) -@chapter Configuring the Citation Engine At the heart of Supercite is a regular expression interpreting engine called @dfn{Regi}. Regi operates by interpreting a data structure @@ -1354,11 +1352,11 @@ cite or fill those differently than normal text. None of this is currently part of Supercite, but contributions are welcome! -@node Using Regi, Frames You Can Customize, Configuring the Citation Engine, Configuring the Citation Engine +@node Using Regi +@section Using Regi @findex regi-interpret @findex eval @findex looking-at -@section Using Regi Regi works by interpreting frames with the function @code{regi-interpret}. A frame is a list of arbitrary size where each @@ -1452,9 +1450,9 @@ The current frame entry being interpreted. @end table -@node Frames You Can Customize, Post-yank Formatting Commands, Using Regi, Configuring the Citation Engine +@node Frames You Can Customize +@section Frames You Can Customize @vindex sc-nuke-mail-header -@section Frames You Can Customize As mentioned earlier, Supercite uses various frames to perform certain jobs such as mail header information extraction and mail header @@ -1516,11 +1514,11 @@ the appropriate alist and attempts to find a frame to use. If one is not found from the alist, then the appropriate default frame is used. -@node Post-yank Formatting Commands, Citing Commands, Frames You Can Customize, Top -@vindex sc-mode-map-prefix -@vindex mode-map-prefix (sc-) -@kindex C-c C-p +@node Post-yank Formatting Commands @chapter Post-yank Formatting Commands +@vindex sc-mode-map-prefix +@vindex mode-map-prefix (sc-) +@kindex C-c C-p Once the original message has been yanked into the reply buffer, and @code{sc-cite-original} has had a chance to do its thing, a number of @@ -1546,9 +1544,9 @@ @end menu @end ifinfo -@node Citing Commands, Insertion Commands, Post-yank Formatting Commands, Post-yank Formatting Commands -@vindex sc-cite-region-limit +@node Citing Commands @section Commands to Manually Cite, Recite, and Uncite +@vindex sc-cite-region-limit Probably the three most common post-yank formatting operations that you will perform will be the manual citing, reciting, and unciting of @@ -1608,7 +1606,7 @@ region, regardless of the value of @code{sc-confirm-always-p}. @end table -@node Insertion Commands, Variable Toggling Shortcuts, Citing Commands, Post-yank Formatting Commands +@node Insertion Commands @section Insertion Commands These two functions insert various strings into the reply buffer. @@ -1638,9 +1636,9 @@ an error and will not cite the line. @end table -@node Variable Toggling Shortcuts, Mail Field Commands, Insertion Commands, Post-yank Formatting Commands +@node Variable Toggling Shortcuts +@section Variable Toggling Shortcuts @cindex toggling variables -@section Variable Toggling Shortcuts Supercite defines a number of commands that make it easier for you to toggle and set various Supercite variables as you are editing the reply @@ -1718,7 +1716,7 @@ brings up a Help message on the toggling keymap. -@node Mail Field Commands, Miscellaneous Commands, Variable Toggling Shortcuts, Post-yank Formatting Commands +@node Mail Field Commands @section Mail Field Commands These commands allow you to view, modify, add, and delete various bits @@ -1768,7 +1766,7 @@ old information is lost.@refill @end table -@node Miscellaneous Commands, Information Keys and the Info Alist, Mail Field Commands, Post-yank Formatting Commands +@node Miscellaneous Commands @section Miscellaneous Commands @table @asis @@ -1782,7 +1780,7 @@ an optional numeric argument inserts that many new lines.@refill @end table -@node Hints to MUA Authors, Thanks and History, Electric References, Top +@node Hints to MUA Authors @chapter Hints to MUA Authors In June of 1989, some discussion was held between the various MUA @@ -1864,7 +1862,7 @@ If you do all this your MUA will join the ranks of those that conform to this interface ``out of the box.'' -@node Thanks and History, GNU Free Documentation License, Hints to MUA Authors, Top +@node Thanks and History @chapter Thanks and History The Supercite package was derived from its predecessor Superyank 1.11 @@ -1901,15 +1899,15 @@ Supercite was written by Barry Warsaw. -@node GNU Free Documentation License, Concept Index, Thanks and History, Top +@node GNU Free Documentation License @appendix GNU Free Documentation License @include doclicense.texi -@node Concept Index, Command Index, GNU Free Documentation License, Top +@node Concept Index @unnumbered Concept Index @printindex cp -@node Command Index, Key Index, Concept Index, Top +@node Command Index @unnumbered Command Index @ifinfo @@ -1922,11 +1920,11 @@ @end iftex @printindex fn -@node Key Index, Variable Index, Command Index, Top +@node Key Index @unnumbered Key Index @printindex ky -@node Variable Index, , Key Index, Top +@node Variable Index @unnumbered Variable Index @ifinfo ------------------------------------------------------------ revno: 108409 fixes bug(s): http://debbugs.gnu.org/11513 committer: Eli Zaretskii branch nick: trunk timestamp: Mon 2012-05-28 20:22:40 +0300 message: Fix bug #11513 with raise-frame on MS-Windows. src/w32term.c (my_bring_window_to_top): New function. (x_raise_frame): Use handle returned by DeferWindowPos, which could be different from the original one. Call my_bring_window_to_top instead of my_set_foreground_window. src/w32fns.c (w32_wnd_proc): Accept and process WM_EMACS_BRINGTOTOP by calling BringWindowToTop. src/w32term.h (WM_EMACS_BRINGTOTOP): New message. (WM_EMACS_END): Increase by one. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-05-28 07:13:45 +0000 +++ src/ChangeLog 2012-05-28 17:22:40 +0000 @@ -1,3 +1,17 @@ +2012-05-28 Eli Zaretskii + + * w32term.c (my_bring_window_to_top): New function. + (x_raise_frame): Use handle returned by DeferWindowPos, which + could be different from the original one. Call + my_bring_window_to_top instead of my_set_foreground_window. + (Bug#11513) + + * w32fns.c (w32_wnd_proc): Accept and process WM_EMACS_BRINGTOTOP + by calling BringWindowToTop. + + * w32term.h (WM_EMACS_BRINGTOTOP): New message. + (WM_EMACS_END): Increase by one. + 2012-05-28 Paul Eggert * bidi.c (bidi_mirror_char): Put eassert before conversion to int. === modified file 'src/w32fns.c' --- src/w32fns.c 2012-05-25 18:19:24 +0000 +++ src/w32fns.c 2012-05-28 17:22:40 +0000 @@ -3663,6 +3663,7 @@ case WM_EMACS_SHOWWINDOW: return ShowWindow ((HWND) wParam, (WPARAM) lParam); + case WM_EMACS_BRINGTOTOP: case WM_EMACS_SETFOREGROUND: { HWND foreground_window; @@ -3680,6 +3681,8 @@ foreground_thread = 0; retval = SetForegroundWindow ((HWND) wParam); + if (msg == WM_EMACS_BRINGTOTOP) + retval = BringWindowToTop ((HWND) wParam); /* Detach from the previous foreground thread. */ if (foreground_thread) === modified file 'src/w32term.c' --- src/w32term.c 2012-05-18 08:36:50 +0000 +++ src/w32term.c 2012-05-28 17:22:40 +0000 @@ -3492,6 +3492,12 @@ (WPARAM) hwnd, 0); } +static void +my_bring_window_to_top (HWND hwnd) +{ + SendMessage (hwnd, WM_EMACS_BRINGTOTOP, (WPARAM) hwnd, 0); +} + /* Create a scroll bar and return the scroll bar vector for it. W is the Emacs window on which to create the scroll bar. TOP, LEFT, WIDTH and HEIGHT are the pixel coordinates and dimensions of the @@ -5600,24 +5606,27 @@ HDWP handle = BeginDeferWindowPos (2); if (handle) { - DeferWindowPos (handle, - FRAME_W32_WINDOW (f), - HWND_TOP, - 0, 0, 0, 0, - SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); - - DeferWindowPos (handle, - GetForegroundWindow (), - FRAME_W32_WINDOW (f), - 0, 0, 0, 0, - SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); - - EndDeferWindowPos (handle); + handle = DeferWindowPos (handle, + FRAME_W32_WINDOW (f), + HWND_TOP, + 0, 0, 0, 0, + SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); + if (handle) + { + handle = DeferWindowPos (handle, + GetForegroundWindow (), + FRAME_W32_WINDOW (f), + 0, 0, 0, 0, + SWP_NOSIZE | SWP_NOMOVE | + SWP_NOACTIVATE); + if (handle) + EndDeferWindowPos (handle); + } } } else { - my_set_foreground_window (FRAME_W32_WINDOW (f)); + my_bring_window_to_top (FRAME_W32_WINDOW (f)); } UNBLOCK_INPUT; === modified file 'src/w32term.h' --- src/w32term.h 2012-01-19 07:21:25 +0000 +++ src/w32term.h 2012-05-28 17:22:40 +0000 @@ -576,7 +576,8 @@ #define WM_EMACS_HIDE_CARET (WM_EMACS_START + 18) #define WM_EMACS_SETCURSOR (WM_EMACS_START + 19) #define WM_EMACS_PAINT (WM_EMACS_START + 20) -#define WM_EMACS_END (WM_EMACS_START + 21) +#define WM_EMACS_BRINGTOTOP (WM_EMACS_START + 21) +#define WM_EMACS_END (WM_EMACS_START + 22) #define WND_FONTWIDTH_INDEX (0) #define WND_LINEHEIGHT_INDEX (4) ------------------------------------------------------------ revno: 108408 committer: Eli Zaretskii branch nick: trunk timestamp: Mon 2012-05-28 20:00:18 +0300 message: Remove HAVE_SYSINFO from nt/config.nt, followup to revno 108401. nt/config.nt (HAVE_SYSINFO): Remove; unused. diff: === modified file 'nt/ChangeLog' --- nt/ChangeLog 2012-05-27 12:11:23 +0000 +++ nt/ChangeLog 2012-05-28 17:00:18 +0000 @@ -1,3 +1,7 @@ +2012-05-28 Eli Zaretskii + + * config.nt (HAVE_SYSINFO): Remove; unused. + 2012-05-27 Eli Zaretskii * inc/stdalign.h: New file. === modified file 'nt/config.nt' --- nt/config.nt 2012-05-27 01:06:44 +0000 +++ nt/config.nt 2012-05-28 17:00:18 +0000 @@ -207,7 +207,6 @@ #undef HAVE_MKDIR #undef HAVE_RMDIR -#undef HAVE_SYSINFO #undef HAVE_RANDOM #undef HAVE_LRAND48 #undef HAVE_MEMCPY ------------------------------------------------------------ revno: 108407 committer: Agustin Martin branch nick: trunk timestamp: Mon 2012-05-28 18:11:15 +0200 message: textmodex/{ispell,flyspell}.el: Decrease XEmacs incompatibilities. * flyspell.el: (flyspell-check-pre-word-p): Use `string-match'. (flyspell-delete-region-overlays): Use alternative definition for XEmacs. (flyspell-delete-all-overlays): Use `flyspell-delete-region-overlays'. (flyspell-word): Use `process-kill-without-query' if XEmacs. (flyspell-mode-on): Use `interactive-p' if XEmacs. (flyspell-incorrect-face, flyspell-duplicate-face): Do not use `define-obsolete-face-alias' under XEmacs, but old method. * ispell.el: (ispell-with-no-warnings): XEmacs alternative `with-no-warnings' definition or Emacs alias. (ispell-command-loop, ispell-message): Use `ispell-with-no-warnings'. (ispell-word): Do not use `region-p' if XEmacs. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-05-28 14:36:27 +0000 +++ lisp/ChangeLog 2012-05-28 16:11:15 +0000 @@ -1,5 +1,23 @@ 2012-05-28 Agustín Martín Domingo + Decrease XEmacs incompatibilities. + * textmodes/flyspell.el (flyspell-check-pre-word-p): + Use `string-match'. + (flyspell-delete-region-overlays): Use alternative definition for + XEmacs. + (flyspell-delete-all-overlays): Use `flyspell-delete-region-overlays'. + (flyspell-word): Use `process-kill-without-query' if XEmacs. + (flyspell-mode-on): Use `interactive-p' if XEmacs. + (flyspell-incorrect-face, flyspell-duplicate-face): Do not use + `define-obsolete-face-alias' under XEmacs, but old method. + + * textmodes/ispell.el (ispell-with-no-warnings): XEmacs alternative + `with-no-warnings' definition or Emacs alias. + (ispell-command-loop, ispell-message): Use `ispell-with-no-warnings'. + (ispell-word): Do not use `region-p' if XEmacs. + +2012-05-28 Agustín Martín Domingo + * textmodes/ispell.el (ispell-find-aspell-dictionaries): Check for `ispell-dictionary-base-alist' instead of full `ispell-dictionary-alist'. === modified file 'lisp/textmodes/flyspell.el' --- lisp/textmodes/flyspell.el 2012-05-18 19:04:07 +0000 +++ lisp/textmodes/flyspell.el 2012-05-28 16:11:15 +0000 @@ -450,7 +450,9 @@ (t (:bold t))) "Face used for marking a misspelled word in Flyspell." :group 'flyspell) -(define-obsolete-face-alias 'flyspell-incorrect-face 'flyspell-incorrect "22.1") +(if (featurep 'emacs) + (define-obsolete-face-alias 'flyspell-incorrect-face 'flyspell-incorrect "22.1") + (put 'flyspell-incorrect-face 'face-alias 'flyspell-incorrect)) (defface flyspell-duplicate '((((class color)) (:foreground "Gold3" :bold t :underline t)) @@ -458,7 +460,9 @@ "Face used for marking a misspelled word that appears twice in the buffer. See also `flyspell-duplicate-distance'." :group 'flyspell) -(define-obsolete-face-alias 'flyspell-duplicate-face 'flyspell-duplicate "22.1") +(if (featurep 'emacs) + (define-obsolete-face-alias 'flyspell-duplicate-face 'flyspell-duplicate "22.1") + (put 'flyspell-duplicate-face 'face-alias 'flyspell-duplicate)) (defvar flyspell-overlay nil) @@ -615,7 +619,9 @@ ;; the welcome message (if (and flyspell-issue-message-flag flyspell-issue-welcome-flag - (called-interactively-p 'interactive)) + (if (featurep 'xemacs) + (interactive-p) ;; XEmacs does not have (called-interactively-p) + (called-interactively-p 'interactive))) (let ((binding (where-is-internal 'flyspell-auto-correct-word nil 'non-ascii))) (message "%s" @@ -739,7 +745,7 @@ ((or (and (= flyspell-pre-point (- (point) 1)) (or (eq (char-syntax (char-after flyspell-pre-point)) ?w) (and (not (string= "" ispell-otherchars)) - (string-match-p + (string-match ispell-otherchars (buffer-substring-no-properties flyspell-pre-point (1+ flyspell-pre-point)))))) @@ -758,7 +764,7 @@ (null (char-after flyspell-pre-point)) (or (eq (char-syntax (char-after flyspell-pre-point)) ?w) (and (not (string= "" ispell-otherchars)) - (string-match-p + (string-match ispell-otherchars (buffer-substring-no-properties flyspell-pre-point (1+ flyspell-pre-point))))))) @@ -1112,7 +1118,9 @@ (ispell-send-string (concat "^" word "\n")) ;; we mark the ispell process so it can be killed ;; when emacs is exited without query - (set-process-query-on-exit-flag ispell-process nil) + (if (featurep 'xemacs) + (process-kill-without-query ispell-process) + (set-process-query-on-exit-flag ispell-process nil)) ;; Wait until ispell has processed word. (while (progn (accept-process-output ispell-process) @@ -1646,12 +1654,19 @@ ;;*---------------------------------------------------------------------*/ (defun flyspell-delete-region-overlays (beg end) "Delete overlays used by flyspell in a given region." - (remove-overlays beg end 'flyspell-overlay t)) - + (if (featurep 'emacs) + (remove-overlays beg end 'flyspell-overlay t) + ;; XEmacs does not have `remove-overlays' + (let ((l (overlays-in beg end))) + (while (consp l) + (progn + (if (flyspell-overlay-p (car l)) + (delete-overlay (car l))) + (setq l (cdr l))))))) (defun flyspell-delete-all-overlays () "Delete all the overlays used by flyspell." - (remove-overlays (point-min) (point-max) 'flyspell-overlay t)) + (flyspell-delete-region-overlays (point-min) (point-max))) ;;*---------------------------------------------------------------------*/ ;;* flyspell-unhighlight-at ... */ === modified file 'lisp/textmodes/ispell.el' --- lisp/textmodes/ispell.el 2012-05-28 14:36:27 +0000 +++ lisp/textmodes/ispell.el 2012-05-28 16:11:15 +0000 @@ -203,6 +203,7 @@ (declare-function ispell-check-minver "ispell" (v1 v2)) (declare-function ispell-looking-back "ispell" (regexp &optional limit &rest ignored)) +(declare-function ispell-with-no-warnings (&rest body)) (if (fboundp 'version<=) (defalias 'ispell-check-minver 'version<=) @@ -254,6 +255,16 @@ (save-excursion (re-search-backward (concat "\\(?:" regexp "\\)\\=") limit t)))) +;;; XEmacs21 does not have `with-no-warnings' + +(if (fboundp 'with-no-warnings) + (defalias 'ispell-with-no-warnings 'with-no-warnings) + (defun ispell-with-no-warnings (&rest body) + "Like `progn', but prevents compiler warnings in the body." + ;; Taken from Emacs' byte-run.el + ;; The implementation for the interpreter is basically trivial. + (car (last body)))) + ;;; Code: (defvar mail-yank-prefix) @@ -1703,7 +1714,12 @@ quit spell session exited." (interactive (list ispell-following-word ispell-quietly current-prefix-arg t)) (cond - ((and region (use-region-p)) + ((and region + (if (featurep 'emacs) + (use-region-p) + (and (boundp 'transient-mark-mode) transient-mark-mode + (boundp 'mark-active) mark-active + (not (eq (region-beginning) (region-end)))))) (ispell-region (region-beginning) (region-end))) (continue (ispell-continue)) (t @@ -1929,7 +1945,7 @@ " -- dict: " (or ispell-current-dictionary "default") " -- prog: " (file-name-nondirectory ispell-program-name))) ;; XEmacs: no need for horizontal scrollbar in choices window - (with-no-warnings + (ispell-with-no-warnings (and (fboundp 'set-specifier) (boundp 'horizontal-scrollbar-visible-p) (set-specifier horizontal-scrollbar-visible-p nil @@ -3708,23 +3724,23 @@ (cite-regexp ;Prefix of quoted text (cond ((functionp 'sc-cite-regexp) ; sc 3.0 - (with-no-warnings + (ispell-with-no-warnings (concat "\\(" (sc-cite-regexp) "\\)" "\\|" (ispell-non-empty-string sc-reference-tag-string)))) ((boundp 'sc-cite-regexp) ; sc 2.3 (concat "\\(" sc-cite-regexp "\\)" "\\|" - (with-no-warnings + (ispell-with-no-warnings (ispell-non-empty-string sc-reference-tag-string)))) ((or (equal major-mode 'news-reply-mode) ;GNUS 4 & below (equal major-mode 'message-mode)) ;GNUS 5 (concat "In article <" "\\|" "[^,;&+=\n]+ <[^,;&+=]+> writes:" "\\|" - (with-no-warnings message-cite-prefix-regexp) + (ispell-with-no-warnings message-cite-prefix-regexp) "\\|" default-prefix)) ((equal major-mode 'mh-letter-mode) ; mh mail message (concat "[^,;&+=\n]+ writes:" "\\|" - (with-no-warnings + (ispell-with-no-warnings (ispell-non-empty-string mh-ins-buf-prefix)))) ((not internal-messagep) ; Assume nn sent us this message. (concat "In [a-zA-Z.]+ you write:" "\\|" ------------------------------------------------------------ revno: 108406 committer: Agustin Martin branch nick: trunk timestamp: Mon 2012-05-28 16:36:27 +0200 message: textmodes/ispell.el: Fix variable name. Show spellchecker on process start. * (ispell-find-aspell-dictionaries): Check for `ispell-dictionary-base-alist' instead of full `ispell-dictionary-alist'. * (ispell-init-process): Show spellchecker when starting new Ispell process. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-05-28 03:42:18 +0000 +++ lisp/ChangeLog 2012-05-28 14:36:27 +0000 @@ -1,3 +1,11 @@ +2012-05-28 Agustín Martín Domingo + + * textmodes/ispell.el (ispell-find-aspell-dictionaries): + Check for `ispell-dictionary-base-alist' instead of full + `ispell-dictionary-alist'. + (ispell-init-process): Show spellchecker when starting new Ispell + process. + 2012-05-28 Stefan Monnier * progmodes/vhdl-mode.el: Sync with upstream 3.33.28. === modified file 'lisp/textmodes/ispell.el' --- lisp/textmodes/ispell.el 2012-05-18 19:04:07 +0000 +++ lisp/textmodes/ispell.el 2012-05-28 14:36:27 +0000 @@ -968,9 +968,9 @@ ;; Ensure aspell's alias dictionary will override standard ;; definitions. (setq found (ispell-aspell-add-aliases found)) - ;; Merge into FOUND any elements from the standard ispell-dictionary-alist + ;; Merge into FOUND any elements from the standard ispell-dictionary-base-alist ;; which have no element in FOUND at all. - (dolist (dict ispell-dictionary-alist) + (dolist (dict ispell-dictionary-base-alist) (unless (assoc (car dict) found) (setq found (nconc found (list dict))))) (setq ispell-aspell-dictionary-alist found) @@ -2707,7 +2707,8 @@ (setq ispell-filter nil ispell-filter-continue nil) ;; may need to restart to select new personal dictionary. (ispell-kill-ispell t) - (message "Starting new Ispell process [%s] ..." + (message "Starting new Ispell process [%s::%s] ..." + ispell-program-name (or ispell-local-dictionary ispell-dictionary "default")) (sit-for 0) (setq ispell-library-directory (ispell-check-version) ------------------------------------------------------------ revno: 108405 committer: Glenn Morris branch nick: trunk timestamp: Mon 2012-05-28 06:17:28 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/config.in' --- autogen/config.in 2012-05-27 10:19:11 +0000 +++ autogen/config.in 2012-05-28 10:17:28 +0000 @@ -492,9 +492,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_VERSION_H -/* Define to 1 if you have the header file. */ -#undef HAVE_LOCALE_H - /* Define to 1 if you have the `localtime_r' function. */ #undef HAVE_LOCALTIME_R @@ -744,9 +741,6 @@ /* Define to 1 if you have the `sync' function. */ #undef HAVE_SYNC -/* Define to 1 if you have the `sysinfo' function. */ -#undef HAVE_SYSINFO - /* Define to 1 if you have the header file. */ #undef HAVE_SYS_BITYPES_H @@ -756,9 +750,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_LOADAVG_H -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_MMAN_H - /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H @@ -798,9 +789,6 @@ /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS__MBSTATE_T_H - /* Define to 1 if you have the header file. */ #undef HAVE_TERM_H === modified file 'autogen/configure' --- autogen/configure 2012-05-27 10:19:11 +0000 +++ autogen/configure 2012-05-28 10:17:28 +0000 @@ -1193,8 +1193,8 @@ CFLAGS_SOUND ALSA_LIBS ALSA_CFLAGS +LIBSOUND PKG_CONFIG -LIBSOUND CRT_DIR START_FILES LIB_MATH @@ -3153,9 +3153,31 @@ >$cache_file fi +as_fn_append ac_header_list " sys/select.h" +as_fn_append ac_header_list " sys/time.h" +as_fn_append ac_header_list " utime.h" +as_fn_append ac_header_list " linux/version.h" +as_fn_append ac_header_list " sys/systeminfo.h" +as_fn_append ac_header_list " stdio_ext.h" +as_fn_append ac_header_list " fcntl.h" +as_fn_append ac_header_list " coff.h" +as_fn_append ac_header_list " pty.h" +as_fn_append ac_header_list " sys/vlimit.h" +as_fn_append ac_header_list " sys/resource.h" +as_fn_append ac_header_list " sys/utsname.h" +as_fn_append ac_header_list " pwd.h" +as_fn_append ac_header_list " utmp.h" +as_fn_append ac_header_list " dirent.h" +as_fn_append ac_header_list " util.h" +as_fn_append ac_header_list " sys/socket.h" as_fn_append ac_header_list " stdlib.h" as_fn_append ac_header_list " unistd.h" as_fn_append ac_header_list " sys/param.h" +as_fn_append ac_header_list " pthread.h" +as_fn_append ac_header_list " malloc/malloc.h" +as_fn_append ac_header_list " maillock.h" +as_fn_append ac_header_list " sys/un.h" +as_fn_append ac_func_list " tzset" as_fn_append ac_func_list " readlinkat" gl_getopt_required=GNU as_fn_append ac_header_list " getopt.h" @@ -3166,13 +3188,10 @@ as_fn_append ac_func_list " alarm" as_fn_append ac_func_list " pthread_sigmask" as_fn_append ac_func_list " readlink" -as_fn_append ac_header_list " sys/socket.h" -as_fn_append ac_func_list " tzset" as_fn_append ac_func_list " strtoimax" as_fn_append ac_func_list " strtoumax" as_fn_append ac_func_list " symlink" as_fn_append ac_header_list " sys/stat.h" -as_fn_append ac_header_list " sys/time.h" as_fn_append ac_func_list " localtime_r" # Check that the precious variables saved in the cache have kept the same # value. @@ -7216,7 +7235,6 @@ for gl_manywarn_item in \ -Wattributes \ -Wcoverage-mismatch \ - -Wmultichar \ -Wunused-macros \ ; do gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" @@ -7679,87 +7697,7 @@ ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -INSTALL_INFO=$ac_cv_path_INSTALL_INFO -if test -n "$INSTALL_INFO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5 -$as_echo "$INSTALL_INFO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -# Extract the first word of "install-info", so it can be a program name with args. -set dummy install-info; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_INSTALL_INFO+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $INSTALL_INFO in - [\\/]* | ?:[\\/]*) - ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /usr/sbin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -INSTALL_INFO=$ac_cv_path_INSTALL_INFO -if test -n "$INSTALL_INFO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5 -$as_echo "$INSTALL_INFO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -# Extract the first word of "install-info", so it can be a program name with args. -set dummy install-info; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_INSTALL_INFO+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $INSTALL_INFO in - [\\/]* | ?:[\\/]*) - ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /sbin +for as_dir in $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. @@ -8251,6 +8189,48 @@ esac +# Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + @@ -8320,48 +8300,6 @@ succeeded=no - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test "$PKG_CONFIG" = "no" ; then HAVE_ALSA=no else @@ -8477,14 +8415,14 @@ fi -for ac_header in sys/select.h sys/time.h unistd.h utime.h \ - linux/version.h sys/systeminfo.h \ - stdio_ext.h fcntl.h coff.h pty.h sys/mman.h \ - sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \ - sys/utsname.h pwd.h utmp.h dirent.h util.h + + + + for ac_header in $ac_header_list do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" eval as_val=\$$as_ac_Header if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF @@ -8496,6 +8434,39 @@ done + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5 $as_echo_n "checking if personality LINUX32 can be set... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8790,17 +8761,8 @@ fi -for ac_header in sys/socket.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_socket_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_SOCKET_H 1 -_ACEOF - -fi - -done + + for ac_header in net/if.h do : @@ -8962,230 +8924,6 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 -$as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if test "${ac_cv_c_bigendian+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_bigendian=unknown - # See if we're dealing with a universal compiler. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - # Check for potential -arch flags. It is not universal unless - # there are at least two -arch flags with different values. - ac_arch= - ac_prev= - for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do - if test -n "$ac_prev"; then - case $ac_word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then - ac_arch=$ac_word - else - ac_cv_c_bigendian=universal - break - fi - ;; - esac - ac_prev= - elif test "x$ac_word" = "x-arch"; then - ac_prev=arch - fi - done -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $ac_cv_c_bigendian = unknown; then - # See if sys/param.h defines the BYTE_ORDER macro. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - -int -main () -{ -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ - && LITTLE_ENDIAN) - bogus endian macros - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - -int -main () -{ -#if BYTE_ORDER != BIG_ENDIAN - not big endian - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes -else - ac_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) - bogus endian macros - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to _BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -#ifndef _BIG_ENDIAN - not big endian - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes -else - ac_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # Compile a test program. - if test "$cross_compiling" = yes; then : - # Try to guess by grepping values from an object file. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -short int ascii_mm[] = - { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; - short int ascii_ii[] = - { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; - int use_ascii (int i) { - return ascii_mm[i] + ascii_ii[i]; - } - short int ebcdic_ii[] = - { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; - short int ebcdic_mm[] = - { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; - int use_ebcdic (int i) { - return ebcdic_mm[i] + ebcdic_ii[i]; - } - extern int foo; - -int -main () -{ -return use_ascii (foo) == use_ebcdic (foo); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then - ac_cv_c_bigendian=yes - fi - if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi - fi -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ - - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long int l; - char c[sizeof (long int)]; - } u; - u.l = 1; - return u.c[sizeof (long int) - 1] == 1; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_c_bigendian=no -else - ac_cv_c_bigendian=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 -$as_echo "$ac_cv_c_bigendian" >&6; } - case $ac_cv_c_bigendian in #( - yes) - $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h -;; #( - no) - ;; #( - universal) - -$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h - - ;; #( - *) - as_fn_error "unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__ ((__aligned__ (expr)))" >&5 $as_echo_n "checking for __attribute__ ((__aligned__ (expr)))... " >&6; } @@ -9218,37 +8956,6 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - DEPFLAGS= MKDEPDIR=":" @@ -9921,24 +9628,6 @@ - for ac_header in $ac_header_list -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - @@ -10211,17 +9900,8 @@ LIB_PTHREAD= -for ac_header in pthread.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" -if test "x$ac_cv_header_pthread_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PTHREAD_H 1 -_ACEOF - -fi - -done + + if test "$ac_cv_header_pthread_h"; then if test "$GMALLOC_OBJ" = gmalloc.o; then @@ -10584,48 +10264,6 @@ succeeded=no - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test "$PKG_CONFIG" = "no" ; then : else @@ -10696,48 +10334,6 @@ succeeded=no - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test "$PKG_CONFIG" = "no" ; then : else @@ -10820,48 +10416,6 @@ succeeded=no - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test "$PKG_CONFIG" = "no" ; then pkg_check_gtk=no else @@ -10928,48 +10482,6 @@ succeeded=no - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test "$PKG_CONFIG" = "no" ; then pkg_check_gtk=no else @@ -11128,48 +10640,6 @@ succeeded=no - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test "$PKG_CONFIG" = "no" ; then HAVE_DBUS=no else @@ -11249,48 +10719,6 @@ succeeded=no - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test "$PKG_CONFIG" = "no" ; then HAVE_GSETTINGS=no else @@ -11352,48 +10780,6 @@ succeeded=no - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test "$PKG_CONFIG" = "no" ; then HAVE_GCONF=no else @@ -11533,48 +10919,6 @@ succeeded=no - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test "$PKG_CONFIG" = "no" ; then HAVE_GNUTLS=no else @@ -12185,48 +11529,6 @@ succeeded=no - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test "$PKG_CONFIG" = "no" ; then HAVE_FC=no else @@ -12285,48 +11587,6 @@ succeeded=no - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test "$PKG_CONFIG" = "no" ; then HAVE_XFT=no else @@ -12494,48 +11754,6 @@ succeeded=no - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test "$PKG_CONFIG" = "no" ; then HAVE_FREETYPE=no else @@ -12596,48 +11814,6 @@ succeeded=no - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test "$PKG_CONFIG" = "no" ; then HAVE_LIBOTF=no else @@ -12746,48 +11922,6 @@ succeeded=no - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test "$PKG_CONFIG" = "no" ; then HAVE_M17N_FLT=no else @@ -13360,12 +12494,7 @@ fi -ac_fn_c_check_header_mongrel "$LINENO" "malloc/malloc.h" "ac_cv_header_malloc_malloc_h" "$ac_includes_default" -if test "x$ac_cv_header_malloc_malloc_h" = x""yes; then : - -$as_echo "#define HAVE_MALLOC_MALLOC_H 1" >>confdefs.h - -fi + @@ -13466,48 +12595,6 @@ succeeded=no - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test "$PKG_CONFIG" = "no" ; then HAVE_LIBXML2=no else @@ -13854,17 +12941,8 @@ fi done -for ac_header in maillock.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "maillock.h" "ac_cv_header_maillock_h" "$ac_includes_default" -if test "x$ac_cv_header_maillock_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MAILLOCK_H 1 -_ACEOF - -fi - -done + + @@ -13915,9 +12993,9 @@ for ac_func in gethostname \ -rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ +rename closedir mkdir rmdir getrusage get_current_dir_name \ random lrand48 logb frexp fmod rint cbrt setsid \ -strerror fpathconf select euidaccess getpagesize tzset setlocale \ +strerror fpathconf select euidaccess getpagesize setlocale \ utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \ __fpending strsignal setitimer \ sendto recvfrom getsockname getpeername \ @@ -13970,17 +13048,8 @@ fi -for ac_header in sys/un.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_un_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_UN_H 1 -_ACEOF - -fi - -done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 @@ -15049,6 +14118,25 @@ + + + + for ac_func in $ac_func_list +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5 $as_echo_n "checking whether localtime caches TZ... " >&6; } if test "${emacs_cv_localtime_cache+set}" = set; then : @@ -15993,22 +15081,6 @@ - for ac_func in $ac_func_list -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if test "${ac_cv_c_bigendian+set}" = set; then : @@ -18443,8 +17515,6 @@ - - if test $ac_cv_header_sys_socket_h = no; then for ac_header in ws2tcpip.h do : @@ -18801,8 +17871,6 @@ - - ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default" if test "x$ac_cv_have_decl_strtoimax" = x""yes; then : ac_have_decl=1 @@ -18940,8 +18008,6 @@ - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 $as_echo_n "checking for struct timespec in ... " >&6; } if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then : @@ -22856,7 +21922,6 @@ as_fn_error "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi - if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 ------------------------------------------------------------ revno: 108404 committer: Paul Eggert branch nick: trunk timestamp: Mon 2012-05-28 00:13:45 -0700 message: * bidi.c (bidi_mirror_char): Put eassert before conversion to int. This avoids undefined behavior that might cause the eassert to not catch an out-of-range value. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-05-28 01:58:42 +0000 +++ src/ChangeLog 2012-05-28 07:13:45 +0000 @@ -1,3 +1,9 @@ +2012-05-28 Paul Eggert + + * bidi.c (bidi_mirror_char): Put eassert before conversion to int. + This avoids undefined behavior that might cause the eassert + to not catch an out-of-range value. + 2012-05-28 Juanma Barranquero * makefile.w32-in ($(BLD)/w32inevt.$(O), $(BLD)/w32console.$(O)): === modified file 'src/bidi.c' --- src/bidi.c 2012-05-27 12:27:07 +0000 +++ src/bidi.c 2012-05-28 07:13:45 +0000 @@ -204,12 +204,14 @@ val = CHAR_TABLE_REF (bidi_mirror_table, c); if (INTEGERP (val)) { - int v = XINT (val); + int v; - /* In a build with extra checks, make sure the value does not - overflow a 32-bit int. */ + /* When debugging, check before assigning to V, so that the check + isn't broken by undefined behavior due to int overflow. */ eassert (CHAR_VALID_P (XINT (val))); + v = XINT (val); + /* Minimal test we must do in optimized builds, to prevent weird crashes further down the road. */ if (v < 0 || v > MAX_CHAR) ------------------------------------------------------------ revno: 108403 author: Reto Zimmermann committer: Stefan Monnier branch nick: trunk timestamp: Sun 2012-05-27 23:42:18 -0400 message: * lisp/progmodes/vhdl-mode.el: Sync with upstream 3.33.28. http://www.iis.ee.ethz.ch/~zimmi/emacs/vhdl-mode.html#release-notes-3.33 diff: === modified file '.bzrignore' --- .bzrignore 2012-05-12 18:03:18 +0000 +++ .bzrignore 2012-05-28 03:42:18 +0000 @@ -150,3 +150,4 @@ src/gl-stamp lisp/mh-e/mh-autoloads.el lisp/mh-e/mh-cus-load.el +lib/stdalign.h === modified file 'etc/NEWS' --- etc/NEWS 2012-05-26 19:55:07 +0000 +++ etc/NEWS 2012-05-28 03:42:18 +0000 @@ -95,6 +95,12 @@ * Changes in Specialized Modes and Packages in Emacs 24.2 +** VHDL-mode +- Support for ghdl (free vhdl compiler). Now default. +- Add/update support for VHDL-AMS packages. +- Update to VHDL'02 standard. +- Accept \r and \f as whitespace. + ** Diff mode Faces for changes now use the same diff color scheme as in modern VCSes === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-05-27 17:31:31 +0000 +++ lisp/ChangeLog 2012-05-28 03:42:18 +0000 @@ -1,3 +1,8 @@ +2012-05-28 Stefan Monnier + + * progmodes/vhdl-mode.el: Sync with upstream 3.33.28. + http://www.iis.ee.ethz.ch/~zimmi/emacs/vhdl-mode.html#release-notes-3.33 + 2012-05-27 Juanma Barranquero * version.el (motif-version-string, gtk-version-string) @@ -14,9 +19,9 @@ 2012-05-27 Eli Zaretskii - * mail/sendmail.el (mail-yank-region): Recognize - rmail-yank-current-message in addition to insert-buffer. Fixes - mail-mode's "C-c C-r" that otherwise does nothing when invoked in + * mail/sendmail.el (mail-yank-region): + Recognize rmail-yank-current-message in addition to insert-buffer. + Fixes mail-mode's "C-c C-r" that otherwise does nothing when invoked in a *mail* buffer created through rmail-start-mail with sendmail as mail-user-agent. === modified file 'lisp/progmodes/vhdl-mode.el' --- lisp/progmodes/vhdl-mode.el 2012-04-09 13:05:48 +0000 +++ lisp/progmodes/vhdl-mode.el 2012-05-28 03:42:18 +0000 @@ -13,10 +13,10 @@ ;; filed in the Emacs bug reporting system against this file, a copy ;; of the bug report be sent to the maintainer's email address. -(defconst vhdl-version "3.33.6" +(defconst vhdl-version "3.33.28" "VHDL Mode version number.") -(defconst vhdl-time-stamp "2005-08-30" +(defconst vhdl-time-stamp "2010-09-22" "VHDL Mode time stamp for last update.") ;; This file is part of GNU Emacs. @@ -72,13 +72,13 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Emacs Versions -;; supported: GNU Emacs 20.X/21.X/22.X, XEmacs 20.X/21.X -;; tested on: GNU Emacs 20.4, XEmacs 21.1 (marginally) +;; supported: GNU Emacs 20.X/21.X/22.X,23.X, XEmacs 20.X/21.X +;; tested on: GNU Emacs 20.4/21.3/22.1,23.X, XEmacs 21.1 (marginally) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Installation -;; Prerequisites: GNU Emacs 20.X/21.X/22.X, XEmacs 20.X/21.X. +;; Prerequisites: GNU Emacs 20.X/21.X/22.X/23.X, XEmacs 20.X/21.X. ;; Put `vhdl-mode.el' into the `site-lisp' directory of your Emacs installation ;; or into an arbitrary directory that is added to the load path by the @@ -93,7 +93,7 @@ ;; Add the following lines to the `site-start.el' file in the `site-lisp' ;; directory of your Emacs installation or to your Emacs start-up file `.emacs' -;; (not required in Emacs 20.X): +;; (not required in Emacs 20 and higher): ;; (autoload 'vhdl-mode "vhdl-mode" "VHDL Mode" t) ;; (setq auto-mode-alist (cons '("\\.vhdl?\\'" . vhdl-mode) auto-mode-alist)) @@ -184,7 +184,7 @@ \".*\" \"\" inserts empty string") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; User variables +;; User variables (customization options) (defgroup vhdl nil "Customizations for VHDL Mode." @@ -210,6 +210,17 @@ (defcustom vhdl-compiler-alist '( + ("ADVance MS" "vacom" "-work \\1" "make" "-f \\1" + nil "valib \\1; vamap \\2 \\1" "./" "work/" "Makefile" "adms" + ("\\s-\\([0-9]+\\):" 0 1 0) ("Compiling file \\(.+\\)" 1) + ("ENTI/\\1.vif" "ARCH/\\1-\\2.vif" "CONF/\\1.vif" + "PACK/\\1.vif" "BODY/\\1.vif" upcase)) + ;; Aldec + ;; COMP96 ERROR COMP96_0078: "Unknown identifier "Addr_Bits"." "" 40 30 + ("Aldec" "vcom" "-93 -work \\1" "make" "-f \\1" + nil "vlib \\1; vmap \\2 \\1" "./" "work/" "Makefile" "aldec" + (".+?[ \t]+\\(?:ERROR\\)[^:]+:.+?\\(?:.+\"\\(.+?\\)\"[ \t]+\\([0-9]+\\)\\)" 1 2 0) ("" 0) + nil) ;; Cadence Leapfrog: cv -file test.vhd ;; duluth: *E,430 (test.vhd,13): identifier (POSITIV) is not declared ("Cadence Leapfrog" "cv" "-work \\1 -file" "make" "-f \\1" @@ -225,6 +236,12 @@ ("ncvhdl_p: \\*E,\\w+ (\\(.+\\),\\([0-9]+\\)|\\([0-9]+\\)):" 1 2 3) ("" 0) ("\\1/entity/pc.db" "\\2/\\1/pc.db" "\\1/configuration/pc.db" "\\1/package/pc.db" "\\1/body/pc.db" downcase)) + ;; ghdl vhdl: ghdl test.vhd + ("GHDL" "ghdl" "-i --workdir=\\1 --ieee=synopsys -fexplicit " "make" "-f \\1" + nil "mkdir \\1" "./" "work/" "Makefile" "ghdl" + ("ghdl_p: \\*E,\\w+ (\\(.+\\),\\([0-9]+\\)|\\([0-9]+\\)):" 1 2 3) ("" 0) + ("\\1/entity" "\\2/\\1" "\\1/configuration" + "\\1/package" "\\1/body" downcase)) ;; Ikos Voyager: analyze test.vhd ;; analyze test.vhd ;; E L4/C5: this library unit is inaccessible @@ -236,10 +253,11 @@ ;; ModelSim, Model Technology: vcom test.vhd ;; ERROR: test.vhd(14): Unknown identifier: positiv ;; WARNING[2]: test.vhd(85): Possible infinite loop + ;; ** Warning: [4] ../src/emacsvsim.vhd(43): An abstract ... ;; ** Error: adder.vhd(190): Unknown identifier: ctl_numb ("ModelSim" "vcom" "-93 -work \\1" "make" "-f \\1" nil "vlib \\1; vmap \\2 \\1" "./" "work/" "Makefile" "modelsim" - ("\\(ERROR\\|WARNING\\|\\*\\* Error\\|\\*\\* Warning\\)[^:]*: \\(.+\\)(\\([0-9]+\\)):" 2 3 0) ("" 0) + ("\\(ERROR\\|WARNING\\|\\*\\* Error\\|\\*\\* Warning\\)[^:]*:\\( *\[[0-9]+\]\\)? \\(.+\\)(\\([0-9]+\\)):" 3 4 0) ("" 0) ("\\1/_primary.dat" "\\2/\\1.dat" "\\1/_primary.dat" "\\1/_primary.dat" "\\1/body.dat" downcase)) ;; ProVHDL, Synopsys LEDA: provhdl -w work -f test.vhd @@ -321,6 +339,12 @@ ("\\*\\*Error: LINE \\([0-9]+\\) \\*\\*\\*" 0 1 0) ("^ *Compiling \"\\(.+\\)\" " 1) nil) + ;; Xilinx XST: + ;; ERROR:HDLParsers:164 - "test.vhd" Line 3. parse error + ("Xilinx XST" "xflow" "" "make" "-f \\1" + nil "mkdir \\1" "./" "work/" "Makefile" "xilinx" + ("^ERROR:HDLParsers:[0-9]+ - \"\\(.+\\)\" Line \\([0-9]+\\)\." 1 2 0) ("" 0) + nil) ) "List of available VHDL compilers and their properties. Each list entry specifies the following items for a compiler: @@ -428,7 +452,7 @@ (vhdl-custom-set variable value 'vhdl-update-mode-menu)) :group 'vhdl-compile) -(defcustom vhdl-compiler "ModelSim" +(defcustom vhdl-compiler "GHDL" "Specifies the VHDL compiler to be used for syntax analysis. Select a compiler name from the ones defined in option `vhdl-compiler-alist'." :type (let ((alist vhdl-compiler-alist) list) @@ -450,6 +474,17 @@ :type 'boolean :group 'vhdl-compile) +(defcustom vhdl-makefile-default-targets '("all" "clean" "library") + "List of default target names in Makefiles. +Automatically generated Makefiles include three default targets to compile +the entire design, clean the entire design and to create the design library. +This option allows to change the names of these targets to avoid conflicts +with other user Makefiles." + :type '(list (string :tag "Compile entire design") + (string :tag "Clean entire design ") + (string :tag "Create design library")) + :group 'vhdl-compile) + (defcustom vhdl-makefile-generation-hook nil "Functions to run at the end of Makefile generation. Allows to insert user specific parts into a Makefile. @@ -647,11 +682,11 @@ :group 'vhdl-port :group 'vhdl-compose) -(defcustom vhdl-standard '(87 nil) +(defcustom vhdl-standard '(93 nil) "VHDL standards used. Basic standard: VHDL'87 : IEEE Std 1076-1987 - VHDL'93 : IEEE Std 1076-1993 + VHDL'93/02 : IEEE Std 1076-1993/2002 Additional standards: VHDL-AMS : IEEE Std 1076.1 (analog-mixed-signal) Math packages: IEEE Std 1076.2 (`math_real', `math_complex') @@ -660,7 +695,7 @@ \"Activate Options\"." :type '(list (choice :tag "Basic standard" (const :tag "VHDL'87" 87) - (const :tag "VHDL'93" 93)) + (const :tag "VHDL'93/02" 93)) (set :tag "Additional standards" :indent 2 (const :tag "VHDL-AMS" ams) (const :tag "Math packages" math))) @@ -730,6 +765,14 @@ (const :tag "Always" always)) :group 'vhdl-style) +(defcustom vhdl-array-index-record-field-in-sensitivity-list t + "Non-nil means include array indices / record fields in sensitivity list. +If a signal read in a process is a record field or pointed to by an array +index, the record field or array index is included with the record name in +the sensitivity list (e.g. \"in1(0)\", \"in2.f0\"). +Otherwise, only the record name is included (e.g. \"in1\", \"in2\")." + :type 'boolean + :group 'vhdl-style) (defgroup vhdl-naming nil "Customizations for naming conventions." @@ -916,7 +959,8 @@ The following keywords for template generation are supported: : replaced by the name of the buffer : replaced by the user name and email address - \(`user-full-name', `mail-host-address', `user-mail-address') + \(`user-full-name',`mail-host-address', `user-mail-address') + : replaced by the user full name (`user-full-name') : replaced by user login name (`user-login-name') : replaced by contents of option `vhdl-company-name' : replaced by the current date @@ -999,11 +1043,12 @@ "Customizations for sequential processes." :group 'vhdl-template) -(defcustom vhdl-reset-kind 'async +(defcustom vhdl-reset-kind 'async "Specifies which kind of reset to use in sequential processes." :type '(choice (const :tag "None" none) (const :tag "Synchronous" sync) - (const :tag "Asynchronous" async)) + (const :tag "Asynchronous" async) + (const :tag "Query" query)) :group 'vhdl-sequential-process) (defcustom vhdl-reset-active-high nil @@ -1563,22 +1608,25 @@ :group 'vhdl-highlight) (defcustom vhdl-special-syntax-alist - '(("generic/constant" "\\w+_[cg]" "Gold3" "BurlyWood1") - ("type" "\\w+_t" "ForestGreen" "PaleGreen") - ("variable" "\\w+_v" "Grey50" "Grey80")) + '(("generic/constant" "\\<\\w+_[cg]\\>" "Gold3" "BurlyWood1" nil) + ("type" "\\<\\w+_t\\>" "ForestGreen" "PaleGreen" nil) + ("variable" "\\<\\w+_v\\>" "Grey50" "Grey80" nil)) "List of special syntax to be highlighted. If option `vhdl-highlight-special-words' is non-nil, words with the specified syntax (as regular expression) are highlighted in the corresponding color. Name : string of words and spaces Regexp : regular expression describing word syntax - (e.g. \"\\\w+_c\" matches word with suffix \"_c\") + (e.g. \"\\\\=\<\\\w+_c\\\\=\>\" matches word with suffix \"_c\") + expression must start with \"\\\\=\<\" and end with \"\\\\=\>\" + if only whole words should be matched (no substrings) Color (light): foreground color for light background (matching color examples: Gold3, Grey50, LimeGreen, Tomato, LightSeaGreen, DodgerBlue, Gold, PaleVioletRed) Color (dark) : foreground color for dark background (matching color examples: BurlyWood1, Grey80, Green, Coral, AquaMarine2, LightSkyBlue1, Yellow, PaleVioletRed1) + In comments : If non-nil, words are also highlighted inside comments Can be used for visual support of naming conventions, such as highlighting different kinds of signals (e.g. \"Clk50\", \"Rst_n\") or objects (e.g. @@ -1593,7 +1641,8 @@ (string :tag "Name ") (regexp :tag "Regexp " "\\w+_") (string :tag "Color (light)") - (string :tag "Color (dark) "))) + (string :tag "Color (dark) ") + (boolean :tag "In comments "))) :set (lambda (variable value) (vhdl-custom-set variable value 'vhdl-font-lock-init)) :group 'vhdl-highlight) @@ -1794,6 +1843,14 @@ :type 'boolean :group 'vhdl-misc) +(defcustom vhdl-indent-comment-like-next-code-line t + "*Non-nil means comment lines are indented like the following code line. +Otherwise, comment lines are indented like the preceding code line. +Indenting comment lines like the following code line gives nicer indentation +when comments precede the code that they refer to." + :type 'boolean + :group 'vhdl-misc) + (defcustom vhdl-word-completion-case-sensitive nil "Non-nil means word completion using `TAB' is case sensitive. That is, `TAB' completes words that start with the same letters and case. @@ -1833,6 +1890,7 @@ (custom-add-to-group 'vhdl-related 'paren-showing 'custom-group)) (custom-add-to-group 'vhdl-related 'ps-print 'custom-group) (custom-add-to-group 'vhdl-related 'speedbar 'custom-group) +(custom-add-to-group 'vhdl-related 'comment-style 'custom-variable) (custom-add-to-group 'vhdl-related 'line-number-mode 'custom-variable) (unless (featurep 'xemacs) (custom-add-to-group 'vhdl-related 'transient-mark-mode 'custom-variable)) @@ -1841,6 +1899,15 @@ (custom-add-to-group 'vhdl-related 'user-mail-address 'custom-variable) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Hidden user variables + +(defvar vhdl-compile-absolute-path nil + "If non-nil, use absolute instead of relative path for compiled files.") + +(defvar vhdl-comment-display-line-char ?- + "Character to use in comment display line.") + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Internal variables (defvar vhdl-menu-max-size 20 @@ -3270,9 +3337,6 @@ (list (append '("Package") - (when (vhdl-standard-p 'math) - '(["math_complex" vhdl-template-package-math-complex t] - ["math_real" vhdl-template-package-math-real t])) '(["numeric_bit" vhdl-template-package-numeric-bit t] ["numeric_std" vhdl-template-package-numeric-std t] ["std_logic_1164" vhdl-template-package-std-logic-1164 t] @@ -3283,8 +3347,22 @@ ["std_logic_unsigned" vhdl-template-package-std-logic-unsigned t] ["std_logic_misc" vhdl-template-package-std-logic-misc t] ["std_logic_textio" vhdl-template-package-std-logic-textio t] - "--" - ["Insert Package..." vhdl-template-insert-package + "--") + (when (vhdl-standard-p 'ams) + '(["fundamental_constants" vhdl-template-package-fundamental-constants t] + ["material_constants" vhdl-template-package-material-constants t] + ["energy_systems" vhdl-template-package-energy-systems t] + ["electrical_systems" vhdl-template-package-electrical-systems t] + ["mechanical_systems" vhdl-template-package-mechanical-systems t] + ["radiant_systems" vhdl-template-package-radiant-systems t] + ["thermal_systems" vhdl-template-package-thermal-systems t] + ["fluidic_systems" vhdl-template-package-fluidic-systems t] + "--")) + (when (vhdl-standard-p 'math) + '(["math_complex" vhdl-template-package-math-complex t] + ["math_real" vhdl-template-package-math-real t] + "--")) + '(["Insert Package..." vhdl-template-insert-package :keys "C-c C-i C-p"]))) '(("Directive" ["translate_on" vhdl-template-directive-translate-on t] @@ -3417,6 +3495,7 @@ ["Buffer" vhdl-beautify-buffer t]) ("Fix" ["Generic/Port Clause" vhdl-fix-clause t] + ["Generic/Port Clause Buffer" vhdl-fix-clause t] "--" ["Case Region" vhdl-fix-case-region (mark)] ["Case Buffer" vhdl-fix-case-buffer t] @@ -3449,11 +3528,13 @@ ("Mode" ["Electric Mode" (progn (customize-set-variable 'vhdl-electric-mode - (not vhdl-electric-mode))) + (not vhdl-electric-mode)) + (vhdl-mode-line-update)) :style toggle :selected vhdl-electric-mode :keys "C-c C-m C-e"] ["Stutter Mode" (progn (customize-set-variable 'vhdl-stutter-mode - (not vhdl-stutter-mode))) + (not vhdl-stutter-mode)) + (vhdl-mode-line-update)) :style toggle :selected vhdl-stutter-mode :keys "C-c C-m C-s"] ["Indent Tabs Mode" (progn (customize-set-variable 'vhdl-indent-tabs-mode @@ -3515,6 +3596,8 @@ (customize-set-variable 'vhdl-compile-use-local-error-regexp (not vhdl-compile-use-local-error-regexp)) :style toggle :selected vhdl-compile-use-local-error-regexp] + ["Makefile Default Targets..." + (customize-option 'vhdl-makefile-default-targets) t] ["Makefile Generation Hook..." (customize-option 'vhdl-makefile-generation-hook) t] ["Default Library Name" (customize-option 'vhdl-default-library) t] @@ -3527,7 +3610,7 @@ (list '87 (cadr vhdl-standard))) (vhdl-activate-customizations)) :style radio :selected (eq '87 (car vhdl-standard))] - ["VHDL'93" + ["VHDL'93/02" (progn (customize-set-variable 'vhdl-standard (list '93 (cadr vhdl-standard))) (vhdl-activate-customizations)) @@ -3580,6 +3663,10 @@ ["Always" (customize-set-variable 'vhdl-use-direct-instantiation 'always) :style radio :selected (eq 'always vhdl-use-direct-instantiation)]) + ["Include Array Index and Record Field in Sensitivity List" + (customize-set-variable 'vhdl-array-index-record-field-in-sensitivity-list + (not vhdl-array-index-record-field-in-sensitivity-list)) + :style toggle :selected vhdl-array-index-record-field-in-sensitivity-list] "--" ["Customize Group..." (customize-group 'vhdl-style) t]) ("Naming" @@ -3676,7 +3763,10 @@ :style radio :selected (eq 'sync vhdl-reset-kind)] ["Asynchronous" (customize-set-variable 'vhdl-reset-kind 'async) - :style radio :selected (eq 'async vhdl-reset-kind)]) + :style radio :selected (eq 'async vhdl-reset-kind)] + ["Query" + (customize-set-variable 'vhdl-reset-kind 'query) + :style radio :selected (eq 'query vhdl-reset-kind)]) ["Reset is Active High" (customize-set-variable 'vhdl-reset-active-high (not vhdl-reset-active-high)) @@ -3966,6 +4056,10 @@ (customize-set-variable 'vhdl-indent-syntax-based (not vhdl-indent-syntax-based)) :style toggle :selected vhdl-indent-syntax-based] + ["Indent Comments Like Next Code Line" + (customize-set-variable 'vhdl-indent-comment-like-next-code-line + (not vhdl-indent-comment-like-next-code-line)) + :style toggle :selected vhdl-indent-comment-like-next-code-line] ["Word Completion is Case Sensitive" (customize-set-variable 'vhdl-word-completion-case-sensitive (not vhdl-word-completion-case-sensitive)) @@ -4009,7 +4103,7 @@ "^\\s-*\\(\\(\\(impure\\|pure\\)\\s-+\\|\\)function\\|procedure\\)\\s-+\\(\"?\\(\\w\\|\\s_\\)+\"?\\)" 4) ("Instance" - "^\\s-*\\(\\(\\w\\|\\s_\\)+\\s-*:\\(\\s-\\|\n\\)*\\(\\w\\|\\s_\\)+\\)\\(\\s-\\|\n\\)+\\(generic\\|port\\)\\s-+map\\>" + "^\\s-*\\(\\(\\w\\|\\s_\\)+\\s-*:\\(\\s-\\|\n\\)*\\(entity\\s-+\\(\\w\\|\\s_\\)+\\.\\)?\\(\\w\\|\\s_\\)+\\)\\(\\s-\\|\n\\)+\\(generic\\|port\\)\\s-+map\\>" 1) ("Component" "^\\s-*\\(component\\)\\s-+\\(\\(\\w\\|\\s_\\)+\\)" @@ -4193,8 +4287,10 @@ with a comment in between. `--CR' comments out code on that line. Re-hitting CR comments out following lines. - `C-c c' comments out a region if not commented out, - uncomments a region if already commented out. + `C-c C-c' comments out a region if not commented out, + uncomments a region if already commented out. Option + `comment-style' defines where the comment characters + should be placed (beginning of line, indent, etc.). You are prompted for comments after object definitions (i.e. signals, variables, constants, ports) and after subprogram and process @@ -4215,7 +4311,8 @@ `TAB' indents a line if at the beginning of the line. The amount of indentation is specified by option `vhdl-basic-offset'. `C-c C-i C-l' always indents the current line (is bound to `TAB' if option - `vhdl-intelligent-tab' is nil). + `vhdl-intelligent-tab' is nil). If a region is active, `TAB' indents + the entire region. Indentation can be done for a group of lines (`C-c C-i C-g'), a region \(`M-C-\\') or the entire buffer (menu). Argument and port lists are @@ -4229,6 +4326,10 @@ Syntax-based indentation can be very slow in large files. Option `vhdl-indent-syntax-based' allows to use faster but simpler indentation. + Option `vhdl-indent-comment-like-next-code-line' controls whether + comment lines are indented like the preceding or like the following code + line. + ALIGNMENT: The alignment functions align operators, keywords, and inline comments @@ -4357,12 +4458,12 @@ STRUCTURAL COMPOSITION: - Enables simple structural composition. `C-c C-c C-n' creates a skeleton + Enables simple structural composition. `C-c C-m C-n' creates a skeleton for a new component. Subcomponents (i.e. component declaration and instantiation) can be automatically placed from a previously read port - \(`C-c C-c C-p') or directly from the hierarchy browser (`P'). Finally, + \(`C-c C-m C-p') or directly from the hierarchy browser (`P'). Finally, all subcomponents can be automatically connected using internal signals - and ports (`C-c C-c C-w') following these rules: + and ports (`C-c C-m C-w') following these rules: - subcomponent actual ports with same name are considered to be connected by a signal (internal signal or port) - signals that are only inputs to subcomponents are considered as @@ -4383,25 +4484,25 @@ Component declarations can be placed in a components package (option `vhdl-use-components-package') which can be automatically generated for - an entire directory or project (`C-c C-c M-p'). The VHDL'93 direct + an entire directory or project (`C-c C-m M-p'). The VHDL'93 direct component instantiation is also supported (option `vhdl-use-direct-instantiation'). -| Configuration declarations can automatically be generated either from -| the menu (`C-c C-c C-f') (for the architecture the cursor is in) or from -| the speedbar menu (for the architecture under the cursor). The -| configurations can optionally be hierarchical (i.e. include all -| component levels of a hierarchical design, option -| `vhdl-compose-configuration-hierarchical') or include subconfigurations -| (option `vhdl-compose-configuration-use-subconfiguration'). For -| subcomponents in hierarchical configurations, the most-recently-analyzed -| (mra) architecture is selected. If another architecture is desired, it -| can be marked as most-recently-analyzed (speedbar menu) before -| generating the configuration. -| -| Note: Configurations of subcomponents (i.e. hierarchical configuration -| declarations) are currently not considered when displaying -| configurations in speedbar. + Configuration declarations can automatically be generated either from + the menu (`C-c C-m C-f') (for the architecture the cursor is in) or from + the speedbar menu (for the architecture under the cursor). The + configurations can optionally be hierarchical (i.e. include all + component levels of a hierarchical design, option + `vhdl-compose-configuration-hierarchical') or include subconfigurations + (option `vhdl-compose-configuration-use-subconfiguration'). For + subcomponents in hierarchical configurations, the most-recently-analyzed + (mra) architecture is selected. If another architecture is desired, it + can be marked as most-recently-analyzed (speedbar menu) before + generating the configuration. + + Note: Configurations of subcomponents (i.e. hierarchical configuration + declarations) are currently not considered when displaying + configurations in speedbar. See the options group `vhdl-compose' for all relevant user options. @@ -4433,11 +4534,13 @@ The Makefile's default target \"all\" compiles the entire design, the target \"clean\" removes it and the target \"library\" creates the - library directory if not existent. The Makefile also includes a target - for each primary library unit which allows selective compilation of this - unit, its secondary units and its subhierarchy (example: compilation of - a design specified by a configuration). User specific parts can be - inserted into a Makefile with option `vhdl-makefile-generation-hook'. + library directory if not existent. These target names can be customized + by option `vhdl-makefile-default-targets'. The Makefile also includes a + target for each primary library unit which allows selective compilation + of this unit, its secondary units and its subhierarchy (example: + compilation of a design specified by a configuration). User specific + parts can be inserted into a Makefile with option + `vhdl-makefile-generation-hook'. Limitations: - Only library units and dependencies within the current library are @@ -4483,7 +4586,7 @@ VHDL STANDARDS: The VHDL standards to be used are specified in option `vhdl-standard'. - Available standards are: VHDL'87/'93, VHDL-AMS, and Math Packages. + Available standards are: VHDL'87/'93(02), VHDL-AMS, and Math Packages. KEYWORD CASE: @@ -4559,6 +4662,9 @@ - Out parameters of procedures are considered to be read. Use option `vhdl-entity-file-name' to specify the entity file name \(used to obtain the port names). + Use option `vhdl-array-index-record-field-in-sensitivity-list' to + specify whether to include array indices and record fields in + sensitivity lists. CODE FIXING: @@ -4632,16 +4738,17 @@ to above mailing lists by sending an email to . VHDL Mode is officially distributed at -URL `http://opensource.ethz.ch/emacs/vhdl-mode.html' +http://www.iis.ee.ethz.ch/~zimmi/emacs/vhdl-mode.html where the latest version can be found. Known problems: --------------- -- Indentation bug in simultaneous if- and case-statements (VHDL-AMS). - XEmacs: Incorrect start-up when automatically opening speedbar. - XEmacs: Indentation in XEmacs 21.4 (and higher). +- Indentation incorrect for new 'postponed' VHDL keyword. +- Indentation incorrect for 'protected body' construct. The VHDL Mode Authors @@ -4764,7 +4871,7 @@ ;;; Keywords and standardized words ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(defconst vhdl-93-keywords +(defconst vhdl-02-keywords '( "abs" "access" "after" "alias" "all" "and" "architecture" "array" "assert" "attribute" @@ -4779,7 +4886,7 @@ "map" "mod" "nand" "new" "next" "nor" "not" "null" "of" "on" "open" "or" "others" "out" - "package" "port" "postponed" "procedure" "process" "pure" + "package" "port" "postponed" "procedure" "process" "protected" "pure" "range" "record" "register" "reject" "rem" "report" "return" "rol" "ror" "select" "severity" "shared" "signal" "sla" "sll" "sra" "srl" "subtype" @@ -4789,7 +4896,7 @@ "wait" "when" "while" "with" "xnor" "xor" ) - "List of VHDL'93 keywords.") + "List of VHDL'02 keywords.") (defconst vhdl-ams-keywords '( @@ -4822,7 +4929,7 @@ ) "List of Verilog keywords as candidate for additional reserved words.") -(defconst vhdl-93-types +(defconst vhdl-02-types '( "boolean" "bit" "bit_vector" "character" "severity_level" "integer" "real" "time" "natural" "positive" "string" "line" "text" "side" @@ -4830,25 +4937,72 @@ "std_logic" "std_logic_vector" "std_ulogic" "std_ulogic_vector" ) - "List of VHDL'93 standardized types.") + "List of VHDL'02 standardized types.") (defconst vhdl-ams-types + ;; standards: IEEE Std 1076.1-2007, IEEE Std 1076.1.1-2004 '( + ;; package `standard' "domain_type" "real_vector" - ;; from `nature_pkg' package - "voltage" "current" "electrical" "position" "velocity" "force" - "mechanical_vf" "mechanical_pf" "rotvel" "torque" "rotational" - "pressure" "flowrate" "fluid" - ) + ;; package `energy_systems' + "energy" "power" "periodicity" "real_across" "real_through" "unspecified" + "unspecified_vector" "energy_vector" "power_vector" "periodicity_vector" + "real_across_vector" "real_through_vector" + ;; package `electrical_systems' + "voltage" "current" "charge" "resistance" "conductance" "capacitance" + "mmf" "electric_flux" "electric_flux_density" "electric_field_strength" + "magnetic_flux" "magnetic_flux_density" "magnetic_field_strength" + "inductance" "reluctance" "electrical" "electrical_vector" "magnetic" + "magnetic_vector" "voltage_vector" "current_vector" "mmf_vector" + "magnetic_flux_vector" "charge_vector" "resistance_vector" + "conductance_vector" "capacitance_vector" "electric_flux_vector" + "electric_flux_density_vector" "electric_field_strength_vector" + "magnetic_flux_density_vector" "magnetic_field_strength_vector" + "inductance_vector" "reluctance_vector" "ground" + ;; package `mechanical_systems' + "displacement" "force" "velocity" "acceleration" "mass" "stiffness" + "damping" "momentum" "angle" "torque" "angular_velocity" + "angular_acceleration" "moment_inertia" "angular_momentum" + "angular_stiffness" "angular_damping" "translational" + "translational_vector" "translational_velocity" + "translational_velocity_vector" "rotational" "rotational_vector" + "rotational_velocity" "rotational_velocity_vector" "displacement_vector" + "force_vector" "velocity_vector" "force_velocity_vector" "angle_vector" + "torque_vector" "angular_velocity_vector" "torque_velocity_vector" + "acceleration_vector" "mass_vector" "stiffness_vector" "damping_vector" + "momentum_vector" "angular_acceleration_vector" "moment_inertia_vector" + "angular_momentum_vector" "angular_stiffness_vector" + "angular_damping_vector" "anchor" "translational_v_ref" + "rotational_v_ref" "translational_v" "rotational_v" + ;; package `radiant_systems' + "illuminance" "luminous_flux" "luminous_intensity" "irradiance" "radiant" + "radiant_vector" "luminous_intensity_vector" "luminous_flux_vector" + "illuminance_vector" "irradiance_vector" + ;; package `thermal_systems' + "temperature" "heat_flow" "thermal_capacitance" "thermal_resistance" + "thermal_conductance" "thermal" "thermal_vector" "temperature_vector" + "heat_flow_vector" "thermal_capacitance_vector" + "thermal_resistance_vector" "thermal_conductance_vector" + ;; package `fluidic_systems' + "pressure" "vflow_rate" "mass_flow_rate" "volume" "density" "viscosity" + "fresistance" "fconductance" "fcapacitance" "inertance" "cfresistance" + "cfcapacitance" "cfinertance" "cfconductance" "fluidic" "fluidic_vector" + "compressible_fluidic" "compressible_fluidic_vector" "pressure_vector" + "vflow_rate_vector" "mass_flow_rate_vector" "volume_vector" + "density_vector" "viscosity_vector" "fresistance_vector" + "fconductance_vector" "fcapacitance_vector" "inertance_vector" + "cfresistance_vector" "cfconductance_vector" "cfcapacitance_vector" + "cfinertance_vector" + ) "List of VHDL-AMS standardized types.") (defconst vhdl-math-types '( - "complex" "complex_polar" + "complex" "complex_polar" "positive_real" "principal_value" ) "List of Math Packages standardized types.") -(defconst vhdl-93-attributes +(defconst vhdl-02-attributes '( "base" "left" "right" "high" "low" "pos" "val" "succ" "pred" "leftof" "rightof" "range" "reverse_range" @@ -4858,7 +5012,7 @@ "simple_name" "instance_name" "path_name" "foreign" ) - "List of VHDL'93 standardized attributes.") + "List of VHDL'02 standardized attributes.") (defconst vhdl-ams-attributes '( @@ -4869,7 +5023,7 @@ ) "List of VHDL-AMS standardized attributes.") -(defconst vhdl-93-enum-values +(defconst vhdl-02-enum-values '( "true" "false" "note" "warning" "error" "failure" @@ -4878,7 +5032,7 @@ "fs" "ps" "ns" "us" "ms" "sec" "min" "hr" "right" "left" ) - "List of VHDL'93 standardized enumeration values.") + "List of VHDL'02 standardized enumeration values.") (defconst vhdl-ams-enum-values '( @@ -4888,22 +5042,38 @@ ) "List of VHDL-AMS standardized enumeration values.") +(defconst vhdl-ams-constants + ;; standard: IEEE Std 1076.1.1-2004 + '( + ;; package `fundamental_constants' + "phys_q" "phys_eps0" "phys_mu0" "phys_k" "phys_gravity" "phys_ctok" + "phys_c" "phys_h" "phys_h_over_2_pi" "yocto" "zepto" "atto" "femto" + "pico" "nano" "micro" "milli" "centi" "deci" "deka" "hecto" "kilo" "mega" + "giga" "tera" "peta" "exa" "zetta" "yotta" "deca" + ;; package `material_constants' + "phys_eps_si" "phys_eps_sio2" "phys_e_si" "phys_e_sio2" "phys_e_poly" + "phys_nu_si" "phys_nu_poly" "phys_rho_poly" "phys_rho_sio2" + "ambient_temperature" "ambient_pressure" "ambient_illuminance" + ) + "List of VHDL-AMS standardized constants.") + (defconst vhdl-math-constants + ;; standard: IEEE Std 1076.2-1996 '( - "math_e" "math_1_over_e" - "math_pi" "math_two_pi" "math_1_over_pi" - "math_half_pi" "math_q_pi" "math_3_half_pi" - "math_log_of_2" "math_log_of_10" "math_log2_of_e" "math_log10_of_e" - "math_sqrt2" "math_sqrt1_2" "math_sqrt_pi" - "math_deg_to_rad" "math_rad_to_deg" - "cbase_1" "cbase_j" "czero" + "math_1_over_e" "math_1_over_pi" "math_1_over_sqrt_2" "math_2_pi" + "math_3_pi_over_2" "math_cbase_1" "math_cbase_j" "math_czero" + "math_deg_to_rad" "math_e" "math_log10_of_e" "math_log2_of_e" + "math_log_of_10" "math_log_of_2" "math_pi" "math_pi_over_2" + "math_pi_over_3" "math_pi_over_4" "math_rad_to_deg" "math_sqrt_2" + "math_sqrt_pi" ) "List of Math Packages standardized constants.") -(defconst vhdl-93-functions +(defconst vhdl-02-functions '( "now" "resolved" "rising_edge" "falling_edge" - "read" "readline" "write" "writeline" "endfile" + "read" "readline" "hread" "oread" "write" "writeline" "hwrite" "owrite" + "endfile" "resize" "is_X" "std_match" "shift_left" "shift_right" "rotate_left" "rotate_right" "to_unsigned" "to_signed" "to_integer" @@ -4913,25 +5083,27 @@ "shl" "shr" "ext" "sxt" "deallocate" ) - "List of VHDL'93 standardized functions.") + "List of VHDL'02 standardized functions.") (defconst vhdl-ams-functions '( + ;; package `standard' "frequency" ) "List of VHDL-AMS standardized functions.") (defconst vhdl-math-functions + ;; standard: IEEE Std 1076.2-1996 '( - "sign" "ceil" "floor" "round" "trunc" "fmax" "fmin" "uniform" - "sqrt" "cbrt" "exp" "log" - "sin" "cos" "tan" "arcsin" "arccos" "arctan" - "sinh" "cosh" "tanh" "arcsinh" "arccosh" "arctanh" - "cmplx" "complex_to_polar" "polar_to_complex" "arg" "conj" + "arccos" "arccosh" "arcsin" "arcsinh" "arctan" "arctanh" "arg" + "cbrt" "ceil" "cmplx" "complex_to_polar" "conj" "cos" "cosh" "exp" + "floor" "get_principal_value" "log" "log10" "log2" "polar_to_complex" + "realmax" "realmin" "round" "sign" "sin" "sinh" "sqrt" + "tan" "tanh" "trunc" "uniform" ) "List of Math Packages standardized functions.") -(defconst vhdl-93-packages +(defconst vhdl-02-packages '( "std_logic_1164" "numeric_std" "numeric_bit" "standard" "textio" @@ -4939,12 +5111,13 @@ "std_logic_misc" "std_logic_textio" "ieee" "std" "work" ) - "List of VHDL'93 standardized packages and libraries.") + "List of VHDL'02 standardized packages and libraries.") (defconst vhdl-ams-packages '( - ;; from `nature_pkg' package - "nature_pkg" + "fundamental_constants" "material_constants" "energy_systems" + "electrical_systems" "mechanical_systems" "radiant_systems" + "thermal_systems" "fluidic_systems" ) "List of VHDL-AMS standardized packages and libraries.") @@ -4990,6 +5163,9 @@ (defvar vhdl-enum-values-regexp nil "Regexp for VHDL standardized enumeration values.") +(defvar vhdl-constants-regexp nil + "Regexp for VHDL standardized constants.") + (defvar vhdl-functions-regexp nil "Regexp for VHDL standardized functions.") @@ -5002,29 +5178,50 @@ (defvar vhdl-directive-keywords-regexp nil "Regexp for compiler directive keywords.") +(defun vhdl-upcase-list (condition list) + "Upcase all elements in LIST based on CONDITION." + (when condition + (let ((tmp-list list)) + (while tmp-list + (setcar tmp-list (upcase (car tmp-list))) + (setq tmp-list (cdr tmp-list))))) + list) + (defun vhdl-words-init () "Initialize reserved words." (setq vhdl-keywords - (append vhdl-93-keywords - (when (vhdl-standard-p 'ams) vhdl-ams-keywords))) + (vhdl-upcase-list + (and vhdl-highlight-case-sensitive vhdl-upper-case-keywords) + (append vhdl-02-keywords + (when (vhdl-standard-p 'ams) vhdl-ams-keywords)))) (setq vhdl-types - (append vhdl-93-types - (when (vhdl-standard-p 'ams) vhdl-ams-types) - (when (vhdl-standard-p 'math) vhdl-math-types))) + (vhdl-upcase-list + (and vhdl-highlight-case-sensitive vhdl-upper-case-types) + (append vhdl-02-types + (when (vhdl-standard-p 'ams) vhdl-ams-types) + (when (vhdl-standard-p 'math) vhdl-math-types)))) (setq vhdl-attributes - (append vhdl-93-attributes - (when (vhdl-standard-p 'ams) vhdl-ams-attributes))) + (vhdl-upcase-list + (and vhdl-highlight-case-sensitive vhdl-upper-case-attributes) + (append vhdl-02-attributes + (when (vhdl-standard-p 'ams) vhdl-ams-attributes)))) (setq vhdl-enum-values - (append vhdl-93-enum-values - (when (vhdl-standard-p 'ams) vhdl-ams-enum-values))) + (vhdl-upcase-list + (and vhdl-highlight-case-sensitive vhdl-upper-case-enum-values) + (append vhdl-02-enum-values + (when (vhdl-standard-p 'ams) vhdl-ams-enum-values)))) (setq vhdl-constants - (append (when (vhdl-standard-p 'math) vhdl-math-constants))) + (vhdl-upcase-list + (and vhdl-highlight-case-sensitive vhdl-upper-case-constants) + (append (when (vhdl-standard-p 'ams) vhdl-ams-constants) + (when (vhdl-standard-p 'math) vhdl-math-constants) + '("")))) (setq vhdl-functions - (append vhdl-93-functions + (append vhdl-02-functions (when (vhdl-standard-p 'ams) vhdl-ams-functions) (when (vhdl-standard-p 'math) vhdl-math-functions))) (setq vhdl-packages - (append vhdl-93-packages + (append vhdl-02-packages (when (vhdl-standard-p 'ams) vhdl-ams-packages) (when (vhdl-standard-p 'math) vhdl-math-packages))) (setq vhdl-reserved-words @@ -5039,6 +5236,8 @@ (concat "\\<\\(" (regexp-opt vhdl-attributes) "\\)\\>")) (setq vhdl-enum-values-regexp (concat "\\<\\(" (regexp-opt vhdl-enum-values) "\\)\\>")) + (setq vhdl-constants-regexp + (concat "\\<\\(" (regexp-opt vhdl-constants) "\\)\\>")) (setq vhdl-functions-regexp (concat "\\<\\(" (regexp-opt vhdl-functions) "\\)\\>")) (setq vhdl-packages-regexp @@ -5090,7 +5289,7 @@ class. Putting underscore in word class breaks forward word movement behavior that users are familiar with.") -(defconst vhdl-case-header-key "case[( \t\n][^;=>]+[) \t\n]is" +(defconst vhdl-case-header-key "case[( \t\n\r\f][^;=>]+[) \t\n\r\f]is" "Regexp describing a case statement header key.") (defconst vhdl-label-key @@ -5318,6 +5517,17 @@ "Check if point is in a string." (eq (vhdl-in-literal) 'string)) +(defun vhdl-in-quote-p () + "Check if point is in a quote ('x')." + (or (and (> (point) (point-min)) + (< (1+ (point)) (point-max)) + (= (char-before (point)) ?\') + (= (char-after (1+ (point))) ?\')) + (and (> (1- (point)) (point-min)) + (< (point) (point-max)) + (= (char-before (1- (point))) ?\') + (= (char-after (point)) ?\')))) + (defun vhdl-in-literal () "Determine if point is in a VHDL literal." (save-excursion @@ -5328,6 +5538,12 @@ ((vhdl-beginning-of-macro) 'pound) (t nil))))) +(defun vhdl-in-extended-identifier-p () + "Determine if point is inside extended identifier (delimited by '\')." + (save-match-data + (and (save-excursion (re-search-backward "\\\\" (vhdl-point 'bol) t)) + (save-excursion (re-search-forward "\\\\" (vhdl-point 'eol) t))))) + (defun vhdl-forward-comment (&optional direction) "Skip all comments (including whitespace). Skip backwards if DIRECTION is negative, skip forward otherwise." @@ -5335,20 +5551,30 @@ (if (and direction (< direction 0)) ;; skip backwards (progn - (skip-chars-backward " \t\n") + (skip-chars-backward " \t\n\r\f") (while (re-search-backward "^[^\"-]*\\(\\(-?\"[^\"]*\"\\|-[^\"-]\\)[^\"-]*\\)*\\(--\\)" (vhdl-point 'bol) t) (goto-char (match-beginning 3)) - (skip-chars-backward " \t\n"))) + (skip-chars-backward " \t\n\r\f"))) ;; skip forwards - (skip-chars-forward " \t\n") + (skip-chars-forward " \t\n\r\f") (while (looking-at "--.*") (goto-char (match-end 0)) - (skip-chars-forward " \t\n")))) + (skip-chars-forward " \t\n\r\f")))) ;; XEmacs hack: work around buggy `forward-comment' in XEmacs 21.4+ (unless (and (featurep 'xemacs) (string< "21.2" emacs-version)) (defalias 'vhdl-forward-comment 'forward-comment)) +(defun vhdl-back-to-indentation () + "Move point to the first non-whitespace character on this line." + (interactive) + (beginning-of-line 1) + (skip-syntax-forward " " (vhdl-point 'eol))) + +;; XEmacs hack: work around old `back-to-indentation' in XEmacs +(when (featurep 'xemacs) + (defalias 'back-to-indentation 'vhdl-back-to-indentation)) + ;; This is the best we can do in Win-Emacs. (defun vhdl-win-il (&optional lim) "Determine if point is in a VHDL literal." @@ -5513,7 +5739,7 @@ (and (save-excursion (forward-sexp) - (skip-chars-forward " \t\n") + (skip-chars-forward " \t\n\r\f") (not (looking-at "is\\b[^_]"))) (save-excursion (backward-sexp) @@ -5553,12 +5779,12 @@ "is")))) (defconst vhdl-begin-fwd-re - "\\b\\(is\\|begin\\|block\\|component\\|generate\\|then\\|else\\|loop\\|process\\|procedural\\|units\\|record\\|for\\)\\b\\([^_]\\|\\'\\)" + "\\b\\(is\\|begin\\|block\\|component\\|generate\\|then\\|else\\|loop\\|process\\|procedural\\(\\s-+body\\)?\\|units\\|use\\|record\\|protected\\(\\s-+body\\)?\\|for\\)\\b\\([^_]\\|\\'\\)" "A regular expression for searching forward that matches all known \"begin\" keywords.") (defconst vhdl-begin-bwd-re - "\\b\\(is\\|begin\\|block\\|component\\|generate\\|then\\|else\\|loop\\|process\\|procedural\\|units\\|record\\|for\\)\\b[^_]" + "\\b\\(is\\|begin\\|block\\|component\\|generate\\|then\\|else\\|loop\\|process\\|procedural\\(\\s-+body\\)?\\|units\\|use\\|record\\|protected\\(\\s-+body\\)?\\|for\\)\\b[^_]" "A regular expression for searching backward that matches all known \"begin\" keywords.") @@ -5591,21 +5817,21 @@ (and (/= (following-char) ?\;) (not (looking-at "is\\|begin\\|process\\|procedural\\|block"))))) t) - ;; "begin", "then": - ((looking-at "be\\|t") + ;; "begin", "then", "use": + ((looking-at "be\\|t\\|use") t) ;; "else": ((and (looking-at "e") ;; make sure that the "else" isn't inside a ;; conditional signal assignment. (save-excursion - (re-search-backward ";\\|\\bwhen\\b[^_]" lim 'move) + (vhdl-re-search-backward ";\\|\\bwhen\\b[^_]" lim 'move) (or (eq (following-char) ?\;) (eq (point) lim)))) t) ;; "block", "generate", "loop", "process", "procedural", - ;; "units", "record": - ((and (looking-at "bl\\|[glpur]") + ;; "units", "record", "protected body": + ((and (looking-at "block\\|generate\\|loop\\|process\\|procedural\\|protected\\(\\s-+body\\)?\\|units\\|record") (save-excursion (backward-sexp) (not (looking-at "end\\s-+\\w")))) @@ -5633,7 +5859,7 @@ (cond ((looking-at "is\\|block\\|generate\\|process\\|procedural") "begin") - ((looking-at "then") + ((looking-at "then\\|use") "") (t "end"))) @@ -5648,6 +5874,9 @@ of an identifier that just happens to contain a \"begin\" keyword." (save-excursion (and (looking-at vhdl-begin-fwd-re) + (or (not (looking-at "\\")) + (save-excursion (back-to-indentation) + (looking-at "\\(\\w+\\s-*:\\s-*\\)?\\<\\(case\\|elsif\\|if\\)\\>"))) (/= (preceding-char) ?_) (not (vhdl-in-literal)) (vhdl-begin-p lim) @@ -5670,8 +5899,8 @@ (vhdl-beginning-of-statement-1 lim) (vhdl-backward-skip-label lim) (vhdl-first-word (point))))))) - ;; "component", "units", "record": - ((looking-at "[cur]") + ;; "component", "units", "record", "protected body": + ((looking-at "component\\|units\\|protected\\(\\s-+body\\)?\\|record") ;; The first end found will close the block (vector "end" nil)) ;; "block", "process", "procedural": @@ -5683,8 +5912,8 @@ (vhdl-backward-skip-label lim) (vhdl-first-word (point)))))) ;; "then": - ((looking-at "t") - (vector "elsif\\|else\\|end\\s-+if" + ((looking-at "t\\|use") + (vector "elsif\\|else\\|end\\s-+\\(if\\|use\\)" (and (vhdl-last-word (point)) (or (vhdl-first-word (point)) (save-excursion @@ -5730,25 +5959,25 @@ (vhdl-end-p lim)) (if (looking-at "el") ;; "else", "elsif": - (vector "if\\|elsif" (vhdl-first-word (point)) "then" nil) + (vector "if\\|elsif" (vhdl-first-word (point)) "then\\|use" nil) ;; "end ...": (setq pos (point)) (forward-sexp) - (skip-chars-forward " \t\n") + (skip-chars-forward " \t\n\r\f") (cond ;; "end if": ((looking-at "if\\b[^_]") (vector "else\\|elsif\\|if" (vhdl-first-word pos) - "else\\|then" nil)) + "else\\|then\\|use" nil)) ;; "end component": ((looking-at "component\\b[^_]") (vector (buffer-substring (match-beginning 1) (match-end 1)) (vhdl-first-word pos) nil nil)) - ;; "end units", "end record": - ((looking-at "\\(units\\|record\\)\\b[^_]") + ;; "end units", "end record", "end protected": + ((looking-at "\\(units\\|record\\|protected\\(\\s-+body\\)?\\)\\b[^_]") (vector (buffer-substring (match-beginning 1) (match-end 1)) (vhdl-first-word pos) @@ -5805,38 +6034,38 @@ (cond ((looking-at "block\\|process\\|procedural") (if (save-excursion (forward-sexp) - (skip-chars-forward " \t\n") + (skip-chars-forward " \t\n\r\f") (= (following-char) ?\()) (forward-sexp 2) (forward-sexp)) - (when (looking-at "[ \t\n]*is") + (when (looking-at "[ \t\n\r\f]*is") (goto-char (match-end 0))) (point)) ((looking-at "component") (forward-sexp 2) - (when (looking-at "[ \t\n]*is") + (when (looking-at "[ \t\n\r\f]*is") (goto-char (match-end 0))) (point)) ((looking-at "for") (forward-sexp 2) - (skip-chars-forward " \t\n") + (skip-chars-forward " \t\n\r\f") (while (looking-at "[,:(]") (forward-sexp) - (skip-chars-forward " \t\n")) + (skip-chars-forward " \t\n\r\f")) (point)) (t nil) ))) (defconst vhdl-trailer-re - "\\b\\(is\\|then\\|generate\\|loop\\|record\\)\\b[^_]") + "\\b\\(is\\|then\\|generate\\|loop\\|record\\|protected\\(\\s-+body\\)?\\|use\\)\\b[^_]") (defconst vhdl-statement-fwd-re - "\\b\\(if\\|for\\|while\\)\\b\\([^_]\\|\\'\\)" + "\\b\\(if\\|for\\|while\\|loop\\)\\b\\([^_]\\|\\'\\)" "A regular expression for searching forward that matches all known \"statement\" keywords.") (defconst vhdl-statement-bwd-re - "\\b\\(if\\|for\\|while\\)\\b[^_]" + "\\b\\(if\\|for\\|while\\|loop\\)\\b[^_]" "A regular expression for searching backward that matches all known \"statement\" keywords.") @@ -5852,7 +6081,7 @@ ;; Make sure it's the start of a parameter specification. (save-excursion (forward-sexp 2) - (skip-chars-forward " \t\n") + (skip-chars-forward " \t\n\r\f") (looking-at "in\\b[^_]")) ;; Make sure it's not an "end for". (save-excursion @@ -5871,7 +6100,7 @@ t) )) -(defconst vhdl-case-alternative-re "when[( \t\n][^;=>]+=>" +(defconst vhdl-case-alternative-re "when[( \t\n\r\f][^;=>]+=>" "Regexp describing a case statement alternative key.") (defun vhdl-case-alternative-p (&optional lim) @@ -5908,6 +6137,9 @@ (cond ;; "begin" keyword: ((and (looking-at vhdl-begin-fwd-re) + (or (not (looking-at "\\")) + (save-excursion (back-to-indentation) + (looking-at "\\(\\w+\\s-*:\\s-*\\)?\\<\\(case\\|elsif\\|if\\)\\>"))) (/= (preceding-char) ?_) (vhdl-begin-p lim)) (setq foundp 'begin)) @@ -5931,7 +6163,7 @@ (save-excursion (while (> count 0) ;; skip whitespace - (skip-chars-forward " \t\n") + (skip-chars-forward " \t\n\r\f") ;; Check for an unbalanced "end" keyword (if (and (looking-at vhdl-end-fwd-re) (/= (preceding-char) ?_) @@ -6007,6 +6239,10 @@ nil (backward-sexp) (if (and (looking-at vhdl-begin-fwd-re) + (or (not (looking-at "\\")) + (save-excursion + (back-to-indentation) + (looking-at "\\(\\w+\\s-*:\\s-*\\)?\\<\\(case\\|elsif\\|if\\)\\>"))) (/= (preceding-char) ?_) (not (vhdl-in-literal)) (vhdl-begin-p lim)) @@ -6278,7 +6514,7 @@ (re-search-forward vhdl-e-o-s-re)) (defconst vhdl-b-o-s-re - (concat ";\\|\(\\|\)\\|\\bwhen\\b[^_]\\|" + (concat ";[^_]\\|\([^_]\\|\)[^_]\\|\\bwhen\\b[^_]\\|" vhdl-begin-bwd-re "\\|" vhdl-statement-bwd-re)) (defun vhdl-beginning-of-statement-1 (&optional lim) @@ -6299,7 +6535,7 @@ (while (and (not donep) (not (bobp)) ;; look backwards for a statement boundary - (re-search-backward vhdl-b-o-s-re lim 'move)) + (progn (forward-char) (re-search-backward vhdl-b-o-s-re lim 'move))) (if (or (= (preceding-char) ?_) (vhdl-in-literal)) (backward-char) @@ -6319,13 +6555,17 @@ (vhdl-forward-syntactic-ws here) (setq donep t)))) ;; If we are looking at a semicolon, then stop - ((eq (following-char) ?\;) + ((and (eq (following-char) ?\;) (not (vhdl-in-quote-p))) (progn (forward-char) (vhdl-forward-syntactic-ws here) (setq donep t))) ;; If we are looking at a "begin", then stop ((and (looking-at vhdl-begin-fwd-re) + (or (not (looking-at "\\")) + (save-excursion + (back-to-indentation) + (looking-at "\\(\\w+\\s-*:\\s-*\\)?\\<\\(case\\|elsif\\|if\\)\\>"))) (/= (preceding-char) ?_) (vhdl-begin-p nil)) ;; If it's a leader "begin", then find the @@ -6576,6 +6816,10 @@ (setq begin-after-ip (and (not literal) (looking-at vhdl-begin-fwd-re) + (or (not (looking-at "\\")) + (save-excursion + (back-to-indentation) + (looking-at "\\(\\w+\\s-*:\\s-*\\)?\\<\\(case\\|elsif\\|if\\)\\>"))) (vhdl-begin-p))) (setq end-after-ip (and (not literal) @@ -6624,7 +6868,8 @@ ((progn (vhdl-backward-syntactic-ws lim) (or (bobp) - (= (preceding-char) ?\;))) + (and (= (preceding-char) ?\;) + (not (vhdl-in-quote-p))))) (vhdl-add-syntax 'statement placeholder)) ;; CASE 2D: we are looking at a top-level statement-cont (t @@ -6662,6 +6907,10 @@ (save-excursion (vhdl-beginning-of-statement-1 containing-sexp) (skip-chars-backward " \t(") + (while (and (= (preceding-char) ?\;) + (not (vhdl-in-quote-p))) + (vhdl-beginning-of-statement-1 containing-sexp) + (skip-chars-backward " \t(")) (<= (point) containing-sexp))) (goto-char containing-sexp) (vhdl-add-syntax 'arglist-cont-nonempty (vhdl-point 'boi))) @@ -6730,7 +6979,7 @@ (save-excursion (goto-char new) (eq new (progn (back-to-indentation) (point))))) - (setq placeholder new))) + (setq placeholder new))) (vhdl-add-syntax 'statement-cont placeholder) (if begin-after-ip (vhdl-add-syntax 'block-open))) @@ -6891,7 +7140,7 @@ (let* ((relpos (cdr langelem)) (assignp (save-excursion (goto-char (vhdl-point 'boi)) - (and (re-search-forward "\\(<\\|:\\)=" + (and (re-search-forward "\\(<\\|:\\|=\\)=" (vhdl-point 'eol) t) (- (point) (vhdl-point 'boi))))) (curcol (progn @@ -6900,7 +7149,7 @@ foundp) (while (and (not foundp) (< (point) (vhdl-point 'eol))) - (re-search-forward "\\(<\\|:\\)=\\|(" (vhdl-point 'eol) 'move) + (re-search-forward "\\(<\\|:\\|=\\)=\\|(" (vhdl-point 'eol) 'move) (if (vhdl-in-literal) (forward-char) (if (= (preceding-char) ?\() @@ -7001,7 +7250,8 @@ (interactive) (if (and (= (preceding-char) ? ) (vhdl-in-comment-p)) (indent-new-comment-line) - (when (and (>= (preceding-char) ?a) (<= (preceding-char) ?z)) + (when (and (>= (preceding-char) ?a) (<= (preceding-char) ?z) + (not (vhdl-in-comment-p))) (vhdl-fix-case-word -1)) (newline-and-indent))) @@ -7011,6 +7261,7 @@ (interactive) (let* ((syntax (and vhdl-indent-syntax-based (vhdl-get-syntactic-context))) (pos (- (point-max) (point))) + (is-comment nil) (indent (if syntax ;; indent syntax-based @@ -7018,6 +7269,15 @@ (>= (vhdl-get-offset (car syntax)) comment-column)) ;; special case: comments at or right of comment-column (vhdl-get-offset (car syntax)) + ;; align comments like following code line + (when vhdl-indent-comment-like-next-code-line + (save-excursion + (while (eq (caar syntax) 'comment) + (setq is-comment t) + (beginning-of-line 2) + (setq syntax (vhdl-get-syntactic-context))))) + (when is-comment + (setq syntax (cons (cons 'comment nil) syntax))) (apply '+ (mapcar 'vhdl-get-offset syntax))) ;; indent like previous nonblank line (save-excursion (beginning-of-line) @@ -7026,10 +7286,13 @@ (shift-amt (- indent (current-indentation)))) (and vhdl-echo-syntactic-information-p (message "syntax: %s, indent= %d" syntax indent)) - (unless (zerop shift-amt) - (delete-region (vhdl-point 'bol) (vhdl-point 'boi)) - (beginning-of-line) - (indent-to indent)) + (let ((has-formfeed + (save-excursion (beginning-of-line) (looking-at "\\s-*\f")))) + (when (or (not (zerop shift-amt)) has-formfeed) + (delete-region (vhdl-point 'bol) (vhdl-point 'boi)) + (beginning-of-line) + (when has-formfeed (insert "\f")) + (indent-to indent))) (if (< (point) (vhdl-point 'boi)) (back-to-indentation) ;; If initial point was within line's indentation, position after @@ -7040,7 +7303,7 @@ (vhdl-update-progress-info "Indenting" (vhdl-current-line)) shift-amt)) -(defun vhdl-indent-region (beg end column) +(defun vhdl-indent-region (beg end &optional column) "Indent region as VHDL code. Adds progress reporting to `indent-region'." (interactive "r\nP") @@ -7055,7 +7318,7 @@ "Indent whole buffer as VHDL code. Calls `indent-region' for whole buffer and adds progress reporting." (interactive) - (vhdl-indent-region (point-min) (point-max) nil)) + (vhdl-indent-region (point-min) (point-max))) (defun vhdl-indent-group () "Indent group of lines between empty lines." @@ -7068,7 +7331,7 @@ (if (re-search-forward vhdl-align-group-separate nil t) (point-marker) (point-max-marker))))) - (vhdl-indent-region beg end nil))) + (vhdl-indent-region beg end))) (defun vhdl-indent-sexp (&optional endpos) "Indent each line of the list starting just after point. @@ -7131,21 +7394,23 @@ (defconst vhdl-align-alist '( ;; after some keywords - (vhdl-mode "^\\s-*\\(constant\\|quantity\\|signal\\|subtype\\|terminal\\|type\\|variable\\)[ \t]" - "^\\s-*\\(constant\\|quantity\\|signal\\|subtype\\|terminal\\|type\\|variable\\)\\([ \t]+\\)" 2) + (vhdl-mode "^\\s-*\\(across\\|constant\\|quantity\\|signal\\|subtype\\|terminal\\|through\\|type\\|variable\\)[ \t]" + "^\\s-*\\(across\\|constant\\|quantity\\|signal\\|subtype\\|terminal\\|through\\|type\\|variable\\)\\([ \t]+\\)" 2) ;; before ':' (vhdl-mode ":[^=]" "\\([ \t]*\\):[^=]") ;; after direction specifications (vhdl-mode ":[ \t]*\\(in\\|out\\|inout\\|buffer\\|\\)\\>" ":[ \t]*\\(in\\|out\\|inout\\|buffer\\|\\)\\([ \t]+\\)" 2) ;; before "==", ":=", "=>", and "<=" - (vhdl-mode "[<:=]=" "\\([ \t]*\\)[<:=]=" 1) ; since "<= ... =>" can occur + (vhdl-mode "[<:=]=" "\\([ \t]*\\)\\??[<:=]=" 1) ; since "<= ... =>" can occur (vhdl-mode "=>" "\\([ \t]*\\)=>" 1) - (vhdl-mode "[<:=]=" "\\([ \t]*\\)[<:=]=" 1) ; since "=> ... <=" can occur + (vhdl-mode "[<:=]=" "\\([ \t]*\\)\\??[<:=]=" 1) ; since "=> ... <=" can occur ;; before some keywords (vhdl-mode "[ \t]after\\>" "[^ \t]\\([ \t]+\\)after\\>" 1) (vhdl-mode "[ \t]when\\>" "[^ \t]\\([ \t]+\\)when\\>" 1) (vhdl-mode "[ \t]else\\>" "[^ \t]\\([ \t]+\\)else\\>" 1) + (vhdl-mode "[ \t]across\\>" "[^ \t]\\([ \t]+\\)across\\>" 1) + (vhdl-mode "[ \t]through\\>" "[^ \t]\\([ \t]+\\)through\\>" 1) ;; before "=>" since "when/else ... =>" can occur (vhdl-mode "=>" "\\([ \t]*\\)=>" 1) ) @@ -7195,7 +7460,7 @@ (forward-list) (setq end (point)) (goto-char (1+ beg)) - (skip-chars-forward " \t\n") + (skip-chars-forward " \t\n\r\f") (setq beg (point)))) ;; run FUNCTION (if beg @@ -7280,8 +7545,14 @@ bol (setq begin (progn (beginning-of-line) (point)))) (while (< bol end) (save-excursion - (when (and (re-search-forward match eol t) - (not (vhdl-in-literal))) + (when (and (vhdl-re-search-forward match eol t) + (save-excursion + (goto-char (match-beginning 0)) + (forward-char) + (and (not (vhdl-in-literal)) + (not (vhdl-in-quote-p)) + (not (vhdl-in-extended-identifier-p)))) + (not (looking-at "\\s-*$"))) (setq distance (- (match-beginning substr) bol)) (when (> distance max) (setq max distance)))) @@ -7295,8 +7566,16 @@ (goto-char (setq bol begin)) (setq eol (point-at-eol)) (while (> lines 0) - (when (and (re-search-forward match eol t) - (not (vhdl-in-literal))) + (when (and (vhdl-re-search-forward match eol t) + (save-excursion + (goto-char (match-beginning 0)) + (forward-char) + (and (not (vhdl-in-literal)) + (not (vhdl-in-quote-p)) + (not (vhdl-in-extended-identifier-p)))) + (not (looking-at "\\s-*$")) + (> (match-beginning 0) ; not if at boi + (save-excursion (back-to-indentation) (point)))) (setq width (- (match-end substr) (match-beginning substr))) (setq distance (- (match-beginning substr) bol)) (goto-char (match-beginning substr)) @@ -7449,7 +7728,7 @@ ;; search for comment start positions and lengths (while (< (point) end) (when (and (not (looking-at "^\\s-*\\(begin\\|end\\)\\>")) - (looking-at "^\\(.*[^ \t\n-]+\\)\\s-*\\(--.*\\)$") + (looking-at "^\\(.*[^ \t\n\r\f-]+\\)\\s-*\\(--.*\\)$") (not (save-excursion (goto-char (match-beginning 2)) (vhdl-in-literal)))) (setq start (+ (- (match-end 1) (match-beginning 1)) spacing)) @@ -7474,7 +7753,7 @@ (while (< (point) end) (setq cur-start nil) (when (and (not (looking-at "^\\s-*\\(begin\\|end\\)\\>")) - (or (and (looking-at "^\\(.*[^ \t\n-]+\\)\\(\\s-*\\)\\(--.*\\)$") + (or (and (looking-at "^\\(.*[^ \t\n\r\f-]+\\)\\(\\s-*\\)\\(--.*\\)$") (not (save-excursion (goto-char (match-beginning 3)) (vhdl-in-literal)))) @@ -7582,32 +7861,35 @@ (setq end (point-marker)) ;; have no space before and one space after `,' and ';' (goto-char beg) - (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\|\'.\'\\)\\|\\(\\s-*\\([,;]\\)\\)" end t) + (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\|\'.\'\\|\\\\[^\\\n]*[\\\n]\\)\\|\\(\\s-*\\([,;]\\)\\)" end t) (if (match-string 1) (goto-char (match-end 1)) - (replace-match "\\3 " nil nil nil 3))) + (replace-match "\\3 " nil nil nil 2))) ;; have no space after `(' (goto-char beg) - (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\|\'.\'\\)\\|\\((\\)\\s-+" end t) + (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\|\'.\'\\|\\\\[^\\\n]*[\\\n]\\)\\|\\((\\)\\s-+" end t) (if (match-string 1) (goto-char (match-end 1)) (replace-match "\\2"))) ;; have no space before `)' (goto-char beg) - (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\|\'.\'\\|^\\s-+\\)\\|\\s-+\\()\\)" end t) + (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\|\'.\'\\|\\\\[^\\\n]*[\\\n]\\|^\\s-+\\)\\|\\s-+\\()\\)" end t) (if (match-string 1) (goto-char (match-end 1)) (replace-match "\\2"))) ;; surround operator symbols by one space (goto-char beg) - (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\|\'.\'\\)\\|\\(\\([^/:<>=]\\)\\(:\\|=\\|<\\|>\\|:=\\|<=\\|>=\\|=>\\|/=\\)\\([^=>]\\|$\\)\\)" end t) - (if (match-string 1) - (goto-char (match-end 1)) + (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\|\'.\'\\|\\\\[^\\\n]*[\\\n]\\)\\|\\(\\([^/:<>=]\\)\\(:\\|\\??=\\|\\??<<\\|\\??>>\\|\\??<\\|\\??>\\|:=\\|\\??<=\\|\\??>=\\|=>\\|\\??/=\\|\\?\\?\\)\\([^=>]\\|$\\)\\)" end t) + (if (or (match-string 1) + (<= (match-beginning 0) ; not if at boi + (save-excursion (back-to-indentation) (point)))) + (goto-char (match-end 0)) (replace-match "\\3 \\4 \\5") (goto-char (match-end 2)))) ;; eliminate multiple spaces and spaces at end of line (goto-char beg) (while (or (and (looking-at "--.*\n") (re-search-forward "--.*\n" end t)) + (and (looking-at "--.*") (re-search-forward "--.*" end t)) (and (looking-at "\"") (re-search-forward "\"[^\"\n]*[\"\n]" end t)) (and (looking-at "\\s-+$") (re-search-forward "\\s-+$" end t) (progn (replace-match "" nil nil) t)) @@ -7618,6 +7900,7 @@ (progn (replace-match " " nil nil) t)) (and (looking-at "\\s-+") (re-search-forward "\\s-+" end t) (progn (replace-match " " nil nil) t)) + (and (looking-at "-") (re-search-forward "-" end t)) ; (re-search-forward "[^ \t-]+" end t)))) (re-search-forward "[^ \t\"-]+" end t)))) (unless no-message (message "Fixing up whitespace...done"))) @@ -7639,7 +7922,7 @@ `vhdl-fix-case-buffer'." (interactive "r") (setq end (save-excursion (goto-char end) (point-marker))) - (vhdl-indent-region beg end nil) + (vhdl-indent-region beg end) (let ((vhdl-align-groups t)) (vhdl-align-region beg end)) (vhdl-fix-case-region beg end)) @@ -7720,7 +8003,7 @@ (vhdl-prepare-search-2 (end-of-line) ;; look whether in process - (if (not (and (re-search-backward "^\\s-*\\(\\w+[ \t\n]*:[ \t\n]*\\)?\\(process\\|end\\s-+process\\)\\>" nil t) + (if (not (and (re-search-backward "^\\s-*\\(\\w+[ \t\n\r\f]*:[ \t\n\r\f]*\\)?\\(process\\|end\\s-+process\\)\\>" nil t) (equal (upcase (match-string 2)) "PROCESS") (save-excursion (re-search-forward "^\\s-*end\\s-+process\\>" nil t)))) (error "ERROR: Not within a process") @@ -7735,7 +8018,7 @@ (vhdl-prepare-search-2 (goto-char (point-min)) (message "Updating sensitivity lists...") - (while (re-search-forward "^\\s-*\\(\\w+[ \t\n]*:[ \t\n]*\\)?process\\>" nil t) + (while (re-search-forward "^\\s-*\\(\\w+[ \t\n\r\f]*:[ \t\n\r\f]*\\)?process\\>" nil t) (goto-char (match-beginning 0)) (condition-case nil (vhdl-update-sensitivity-list) (error ""))) (message "Updating sensitivity lists...done")))) @@ -7744,9 +8027,13 @@ "Update sensitivity list." (let ((proc-beg (point)) (proc-end (re-search-forward "^\\s-*end\\s-+process\\>" nil t)) - (proc-mid (re-search-backward "^\\s-*begin\\>" nil t)) + (proc-mid (vhdl-re-search-backward + "\\(\\(\\\\)\\|^\\s-*process\\>\\)" nil t)) seq-region-list) (cond + ;; error if 'begin' keyword missing + ((not (match-string 2)) + (error "ERROR: No 'begin' keyword found")) ;; search for wait statement (no sensitivity list allowed) ((progn (goto-char proc-mid) (vhdl-re-search-forward "\\" proc-end t)) @@ -7780,19 +8067,19 @@ ;; case expression ((re-search-forward "^\\s-*case\\>" proc-end t) (re-search-forward "\\" proc-end t)) - ;; parameter list of procedure call - ((and (re-search-forward "^\\s-*\\w+[ \t\n]*(" proc-end t) + ;; parameter list of procedure call, array index + ((and (re-search-forward "^\\s-*\\(\\w\\|\\.\\)+[ \t\n\r\f]*(" proc-end t) (1- (point))) (progn (backward-char) (forward-sexp) (while (looking-at "(") (forward-sexp)) (point))))) - name read-list sens-list signal-list + name field read-list sens-list signal-list sens-beg sens-end beg end margin) ;; scan for signals in old sensitivity list (goto-char proc-beg) (re-search-forward "\\" proc-mid t) - (if (not (looking-at "[ \t\n]*(")) + (if (not (looking-at "[ \t\n\r\f]*(")) (setq sens-beg (point)) - (setq sens-beg (re-search-forward "\\([ \t\n]*\\)([ \t\n]*" nil t)) + (setq sens-beg (re-search-forward "\\([ \t\n\r\f]*\\)([ \t\n\r\f]*" nil t)) (goto-char (match-end 1)) (forward-sexp) (setq sens-end (1- (point))) @@ -7825,15 +8112,17 @@ (< (point) (caar tmp-list))) (setq tmp-list (cdr tmp-list))) (and tmp-list (< (point) (cdar tmp-list)))))) - (while (vhdl-re-search-forward "[^'\"]\\<\\([a-zA-Z]\\w*\\)\\>[ \t\n]*\\('\\(\\w+\\)\\|\\(=>\\)\\)?" end t) + (while (vhdl-re-search-forward "[^'\".]\\<\\([a-zA-Z]\\w*\\)\\(\\(\\.\\w+\\|[ \t\n\r\f]*([^)]*)\\)*\\)[ \t\n\r\f]*\\('\\(\\w+\\)\\|\\(=>\\)\\)?" end t) (setq name (match-string 1)) - (when (and (not (match-string 4)) ; not when formal parameter - (not (and (match-string 3) ; not event attribute - (not (member (downcase (match-string 3)) + (when vhdl-array-index-record-field-in-sensitivity-list + (setq field (match-string 2))) + (when (and (not (match-string 6)) ; not when formal parameter + (not (and (match-string 5) ; not event attribute + (not (member (downcase (match-string 5)) '("event" "last_event" "transaction"))))) (member (downcase name) signal-list)) - (unless (member-ignore-case name read-list) - (setq read-list (cons name read-list)))) + (unless (member-ignore-case (concat name field) read-list) + (setq read-list (cons (concat name field) read-list)))) (goto-char (match-end 1))))) (setq scan-regions-list (cdr scan-regions-list))) ;; update sensitivity list @@ -7879,17 +8168,17 @@ (goto-char (point-min)) (if (not (re-search-forward (concat "^entity\\s-+" entity-name "\\>") nil t)) (error "ERROR: Entity \"%s\" not found:\n --> see option `vhdl-entity-file-name'" entity-name) - (when (setq beg (re-search-forward - "^\\s-*port[ \t\n]*(" + (when (setq beg (vhdl-re-search-forward + "\\" nil t)) t)) (setq end (save-excursion (backward-char) (forward-sexp) (point))) (vhdl-forward-syntactic-ws) (while (< (point) end) - (when (looking-at "signal[ \t\n]+") + (when (looking-at "signal[ \t\n\r\f]+") (goto-char (match-end 0))) - (while (looking-at "\\(\\w+\\)[ \t\n,]+") + (while (looking-at "\\(\\w+\\)[ \t\n\r\f,]+") (setq signal-list (cons (downcase (match-string 1)) signal-list)) (goto-char (match-end 0)) @@ -7908,12 +8197,12 @@ (when (= 0 (nth 0 (parse-partial-sexp beg (point)))) (if (match-string 2) ;; scan signal name - (while (looking-at "[ \t\n,]+\\(\\w+\\)") + (while (looking-at "[ \t\n\r\f,]+\\(\\w+\\)") (setq signal-list (cons (downcase (match-string 1)) signal-list)) (goto-char (match-end 0))) ;; scan alias name, check is alias of (declared) signal - (when (and (looking-at "[ \t\n]+\\(\\w+\\)[^;]*\\")) - (when (eq vhdl-reset-kind 'async) + (when (eq reset-kind 'query) + (setq reset-kind + (if (eq (vhdl-decision-query + "" "(a)synchronous or (s)ynchronous reset?" t) ?a) + 'async + 'sync))) + (when (eq reset-kind 'async) (insert ", ") (setq reset (or (and (not (equal "" vhdl-reset-name)) (progn (insert vhdl-reset-name) vhdl-reset-name)) @@ -9257,7 +9567,7 @@ (unless (vhdl-standard-p '87) (vhdl-insert-keyword " IS")) (insert "\n") (vhdl-template-begin-end "PROCESS" label margin) - (when seq (setq reset (vhdl-template-seq-process clock reset))) + (when seq (setq reset (vhdl-template-seq-process clock reset reset-kind))) (when vhdl-prompt-for-comments (setq final-pos (point-marker)) (vhdl-prepare-search-2 @@ -9589,13 +9899,13 @@ (in-arglist (vhdl-in-argument-list-p))) (vhdl-prepare-search-2 (if (or (save-excursion - (and (vhdl-re-search-backward - "\\" - nil t) - (not (progn (backward-word 1) (looking-at "\\"))))) + (progn (vhdl-beginning-of-block) + (looking-at "\\s-*\\(\\w+\\s-*:\\s-*\\)?\\<\\(\\"))) (save-excursion (backward-word 1) (looking-at "\\"))) (vhdl-insert-keyword "VARIABLE ") - (vhdl-insert-keyword "SHARED VARIABLE "))) + (if (vhdl-standard-p '87) + (error "ERROR: Not within sequential block") + (vhdl-insert-keyword "SHARED VARIABLE ")))) (when (vhdl-template-field "names" nil t start (point)) (insert " : ") (when in-arglist (vhdl-template-field "[IN | OUT | INOUT]" " " t)) @@ -9692,14 +10002,16 @@ (concat (if vhdl-clock-rising-edge "rising" "falling") " clock edge"))))) -(defun vhdl-template-seq-process (clock reset) +(defun vhdl-template-seq-process (clock reset reset-kind) "Insert a template for the body of a sequential process." (let ((margin (current-indentation)) position) (vhdl-insert-keyword "IF ") - (when (eq vhdl-reset-kind 'async) + (when vhdl-conditions-in-parenthesis (insert "(")) + (when (eq reset-kind 'async) (insert reset " = " (if vhdl-reset-active-high vhdl-one-string vhdl-zero-string)) + (when vhdl-conditions-in-parenthesis (insert ")")) (vhdl-insert-keyword " THEN") (vhdl-comment-insert-inline (concat "asynchronous reset (active " @@ -9707,7 +10019,8 @@ (insert "\n") (indent-to (+ margin vhdl-basic-offset)) (setq position (point)) (insert "\n") (indent-to margin) - (vhdl-insert-keyword "ELSIF ")) + (vhdl-insert-keyword "ELSIF ") + (when vhdl-conditions-in-parenthesis (insert "("))) (if (eq vhdl-clock-edge-condition 'function) (insert (if vhdl-clock-rising-edge "rising" "falling") "_edge(" clock ")") @@ -9715,17 +10028,20 @@ (vhdl-insert-keyword " AND ") (insert clock " = " (if vhdl-clock-rising-edge vhdl-one-string vhdl-zero-string))) + (when vhdl-conditions-in-parenthesis (insert ")")) (vhdl-insert-keyword " THEN") (vhdl-comment-insert-inline (concat (if vhdl-clock-rising-edge "rising" "falling") " clock edge")) (insert "\n") (indent-to (+ margin vhdl-basic-offset)) - (when (eq vhdl-reset-kind 'sync) + (when (eq reset-kind 'sync) (vhdl-insert-keyword "IF ") + (when vhdl-conditions-in-parenthesis (insert "(")) (setq reset (or (and (not (equal "" vhdl-reset-name)) (progn (insert vhdl-reset-name) vhdl-reset-name)) (vhdl-template-field "reset name") "")) (insert " = " (if vhdl-reset-active-high vhdl-one-string vhdl-zero-string)) + (when vhdl-conditions-in-parenthesis (insert ")")) (vhdl-insert-keyword " THEN") (vhdl-comment-insert-inline (concat "synchronous reset (active " @@ -9737,7 +10053,7 @@ (insert "\n") (indent-to (+ margin (* 2 vhdl-basic-offset))) (insert "\n") (indent-to (+ margin vhdl-basic-offset)) (vhdl-insert-keyword "END IF;")) - (when (eq vhdl-reset-kind 'none) + (when (eq reset-kind 'none) (setq position (point))) (insert "\n") (indent-to margin) (vhdl-insert-keyword "END IF;") @@ -9761,21 +10077,11 @@ (insert library ";") (when package (insert "\n") - (indent-to margin))) - (when package - (vhdl-insert-keyword "USE ") - (insert library "." package) - (vhdl-insert-keyword ".ALL;"))))) - -(defun vhdl-template-package-math-complex () - "Insert specification of `math_complex' package." - (interactive) - (vhdl-template-standard-package "ieee" "math_complex")) - -(defun vhdl-template-package-math-real () - "Insert specification of `math_real' package." - (interactive) - (vhdl-template-standard-package "ieee" "math_real")) + (indent-to margin)))) + (when package + (vhdl-insert-keyword "USE ") + (insert library "." package) + (vhdl-insert-keyword ".ALL;")))) (defun vhdl-template-package-numeric-bit () "Insert specification of `numeric_bit' package." @@ -9822,6 +10128,56 @@ (interactive) (vhdl-template-standard-package "std" "textio")) +(defun vhdl-template-package-fundamental-constants () + "Insert specification of `fundamental_constants' package." + (interactive) + (vhdl-template-standard-package "ieee" "fundamental_constants")) + +(defun vhdl-template-package-material-constants () + "Insert specification of `material_constants' package." + (interactive) + (vhdl-template-standard-package "ieee" "material_constants")) + +(defun vhdl-template-package-energy-systems () + "Insert specification of `energy_systems' package." + (interactive) + (vhdl-template-standard-package "ieee" "energy_systems")) + +(defun vhdl-template-package-electrical-systems () + "Insert specification of `electrical_systems' package." + (interactive) + (vhdl-template-standard-package "ieee" "electrical_systems")) + +(defun vhdl-template-package-mechanical-systems () + "Insert specification of `mechanical_systems' package." + (interactive) + (vhdl-template-standard-package "ieee" "mechanical_systems")) + +(defun vhdl-template-package-radiant-systems () + "Insert specification of `radiant_systems' package." + (interactive) + (vhdl-template-standard-package "ieee" "radiant_systems")) + +(defun vhdl-template-package-thermal-systems () + "Insert specification of `thermal_systems' package." + (interactive) + (vhdl-template-standard-package "ieee" "thermal_systems")) + +(defun vhdl-template-package-fluidic-systems () + "Insert specification of `fluidic_systems' package." + (interactive) + (vhdl-template-standard-package "ieee" "fluidic_systems")) + +(defun vhdl-template-package-math-complex () + "Insert specification of `math_complex' package." + (interactive) + (vhdl-template-standard-package "ieee" "math_complex")) + +(defun vhdl-template-package-math-real () + "Insert specification of `math_real' package." + (interactive) + (vhdl-template-standard-package "ieee" "math_real")) + (defun vhdl-template-directive (directive) "Insert directive." (unless (= (current-indentation) (current-column)) @@ -9900,6 +10256,9 @@ (insert (user-full-name)) (when user-mail-address (insert " <" user-mail-address ">"))) (goto-char beg) + (while (search-forward "" end t) + (replace-match (user-full-name) t t)) + (goto-char beg) (while (search-forward "" end t) (replace-match (user-login-name) t t)) (goto-char beg) @@ -9915,7 +10274,7 @@ (while (search-forward "" end t) (replace-match (concat "VHDL" (cond ((vhdl-standard-p '87) "'87") - ((vhdl-standard-p '93) "'93")) + ((vhdl-standard-p '93) "'93/02")) (when (vhdl-standard-p 'ams) ", VHDL-AMS") (when (vhdl-standard-p 'math) ", Math Packages")) t t)) (goto-char beg) @@ -10021,9 +10380,10 @@ "Displays one line of dashes." (interactive) (while (= (preceding-char) ?-) (delete-char -2)) + (insert "--") (let* ((col (current-column)) (len (- end-comment-column col))) - (insert-char ?- len))) + (insert-char vhdl-comment-display-line-char len))) (defun vhdl-comment-append-inline () "Append empty inline comment to current line." @@ -10084,7 +10444,7 @@ (goto-char beg) (beginning-of-line) (setq beg (point)) - (if (looking-at comment-start) + (if (looking-at (concat "\\s-*" comment-start)) (comment-region beg end '(4)) (comment-region beg end)))) @@ -10119,7 +10479,7 @@ (goto-char beg) (beginning-of-line) (while (< (point) end) - (when (looking-at "^.*[^ \t\n-]+\\(\\s-*--.*\\)$") + (when (looking-at "^.*[^ \t\n\r\f-]+\\(\\s-*--.*\\)$") (delete-region (match-beginning 1) (match-end 1))) (beginning-of-line 2)))) @@ -10323,9 +10683,9 @@ (self-insert-command count) (cond ((>= (current-column) (+ 2 end-comment-column)) (backward-char 1) - (skip-chars-backward "^ \t\n") + (skip-chars-backward "^ \t\n\r\f") (indent-new-comment-line) - (skip-chars-forward "^ \t\n") + (skip-chars-forward "^ \t\n\r\f") (forward-char 1)) ((>= (current-column) end-comment-column) (indent-new-comment-line)) @@ -10369,7 +10729,9 @@ (vhdl-fix-case-region-1 position (point) vhdl-upper-case-attributes (concat "'" vhdl-attributes-regexp)) (vhdl-fix-case-region-1 position (point) vhdl-upper-case-enum-values - vhdl-enum-values-regexp)) + vhdl-enum-values-regexp) + (vhdl-fix-case-region-1 position (point) vhdl-upper-case-constants + vhdl-constants-regexp)) (when (or (not (equal string "")) (not optional)) (insert (or follow-string ""))) (if (equal string "") nil string))) @@ -10455,55 +10817,57 @@ (defun vhdl-beginning-of-block () "Move cursor to the beginning of the enclosing block." (let (pos) - (save-excursion - (beginning-of-line) - ;; search backward for block beginning or end - (while (or (while (and (setq pos (re-search-backward "^\\s-*\\(\\(end\\)\\|\\(\\(impure\\|pure\\)[ \t\n]+\\)?\\(function\\|procedure\\)\\|\\(for\\)\\|\\(architecture\\|component\\|configuration\\|entity\\|package\\|record\\|units\\)\\|\\(\\w+[ \t\n]*:[ \t\n]*\\)?\\(postponed[ \t\n]+\\)?\\(block\\|case\\|for\\|if\\|procedural\\|process\\|while\\)\\)\\>" nil t)) - ;; not consider subprogram declarations - (or (and (match-string 5) - (save-match-data - (save-excursion - (goto-char (match-end 5)) - (forward-word 1) - (vhdl-forward-syntactic-ws) - (when (looking-at "(") - (forward-sexp)) - (re-search-forward "\\\\|\\(;\\)" nil t)) - (match-string 1))) - ;; not consider configuration specifications - (and (match-string 6) - (save-match-data - (save-excursion - (vhdl-end-of-block) - (beginning-of-line) - (not (looking-at "^\\s-*end\\s-+\\(for\\|generate\\|loop\\)\\>")))))))) - (match-string 2)) - ;; skip subblock if block end found - (vhdl-beginning-of-block))) + (vhdl-prepare-search-2 + (save-excursion + (beginning-of-line) + ;; search backward for block beginning or end + (while (or (while (and (setq pos (re-search-backward "^\\s-*\\(\\(end\\)\\|\\(\\(impure\\|pure\\)[ \t\n\r\f]+\\)?\\(function\\|procedure\\)\\|\\(for\\)\\|\\(architecture\\|component\\|configuration\\|entity\\|package\\(\\s-+body\\)?\\|type[ \t\n\r\f]+\\w+[ \t\n\r\f]+is[ \t\n\r\f]+\\(record\\|protected\\(\\s-+body\\)?\\)\\|units\\)\\|\\(\\w+[ \t\n\r\f]*:[ \t\n\r\f]*\\)?\\(postponed[ \t\n\r\f]+\\)?\\(block\\|case\\|for\\|if\\|procedural\\|process\\|while\\|loop\\)\\)\\>" nil t)) + ;; not consider subprogram declarations + (or (and (match-string 5) + (save-match-data + (save-excursion + (goto-char (match-end 5)) + (forward-word 1) + (vhdl-forward-syntactic-ws) + (when (looking-at "(") + (forward-sexp)) + (re-search-forward "\\\\|\\(;\\)" nil t)) + (match-string 1))) + ;; not consider configuration specifications + (and (match-string 6) + (save-match-data + (save-excursion + (vhdl-end-of-block) + (beginning-of-line) + (not (looking-at "^\\s-*end\\s-+\\(for\\|generate\\|loop\\)\\>")))))))) + (match-string 2)) + ;; skip subblock if block end found + (vhdl-beginning-of-block)))) (when pos (goto-char pos)))) (defun vhdl-end-of-block () "Move cursor to the end of the enclosing block." (let (pos) - (save-excursion - (end-of-line) - ;; search forward for block beginning or end - (while (or (while (and (setq pos (re-search-forward "^\\s-*\\(\\(end\\)\\|\\(\\(impure\\|pure\\)[ \t\n]+\\)?\\(function\\|procedure\\)\\|\\(for\\)\\|\\(architecture\\|component\\|configuration\\|entity\\|package\\|record\\|units\\)\\|\\(\\w+[ \t\n]*:[ \t\n]*\\)?\\(postponed[ \t\n]+\\)?\\(block\\|case\\|for\\|if\\|procedural\\|process\\|while\\)\\)\\>" nil t)) - ;; not consider subprogram declarations - (or (and (match-string 5) - (save-match-data - (save-excursion (re-search-forward "\\\\|\\(;\\)" nil t)) - (match-string 1))) - ;; not consider configuration specifications - (and (match-string 6) - (save-match-data - (save-excursion - (vhdl-end-of-block) - (beginning-of-line) - (not (looking-at "^\\s-*end\\s-+\\(for\\|generate\\|loop\\)\\>")))))))) - (not (match-string 2))) - ;; skip subblock if block beginning found - (vhdl-end-of-block))) + (vhdl-prepare-search-2 + (save-excursion + (end-of-line) + ;; search forward for block beginning or end + (while (or (while (and (setq pos (re-search-forward "^\\s-*\\(\\(end\\)\\|\\(\\(impure\\|pure\\)[ \t\n\r\f]+\\)?\\(function\\|procedure\\)\\|\\(for\\)\\|\\(architecture\\|component\\|configuration\\|entity\\|package\\(\\s-+body\\)?\\|type[ \t\n\r\f]+\\w+[ \t\n\r\f]+is[ \t\n\r\f]+\\(record\\|protected\\(\\s-+body\\)?\\)\\|units\\)\\|\\(\\w+[ \t\n\r\f]*:[ \t\n\r\f]*\\)?\\(postponed[ \t\n\r\f]+\\)?\\(block\\|case\\|for\\|if\\|procedural\\|process\\|while\\|loop\\)\\)\\>" nil t)) + ;; not consider subprogram declarations + (or (and (match-string 5) + (save-match-data + (save-excursion (re-search-forward "\\\\|\\(;\\)" nil t)) + (match-string 1))) + ;; not consider configuration specifications + (and (match-string 6) + (save-match-data + (save-excursion + (vhdl-end-of-block) + (beginning-of-line) + (not (looking-at "^\\s-*end\\s-+\\(for\\|generate\\|loop\\)\\>")))))))) + (not (match-string 2))) + ;; skip subblock if block beginning found + (vhdl-end-of-block)))) (when pos (goto-char pos)))) (defun vhdl-sequential-statement-p () @@ -10518,7 +10882,7 @@ (< start (point))) ;; ... a sequential block (progn (vhdl-beginning-of-block) - (looking-at "^\\s-*\\(\\(\\w+[ \t\n]+\\)?\\(function\\|procedure\\)\\|\\(\\w+[ \t\n]*:[ \t\n]*\\)?\\(\\w+[ \t\n]+\\)?\\(procedural\\|process\\)\\)\\>"))))))) + (looking-at "^\\s-*\\(\\(\\w+[ \t\n\r\f]+\\)?\\(function\\|procedure\\)\\|\\(\\w+[ \t\n\r\f]*:[ \t\n\r\f]*\\)?\\(\\w+[ \t\n\r\f]+\\)?\\(procedural\\|process\\)\\)\\>"))))))) (defun vhdl-in-argument-list-p () "Check if within an argument list." @@ -10542,7 +10906,9 @@ (progn (insert " ") (unexpand-abbrev) - (delete-char -1)) + (backward-word 1) + (vhdl-case-word 1) + (delete-char 1)) (if (not vhdl-electric-mode) (progn (insert " ") @@ -10821,7 +11187,10 @@ (defun vhdl-parse-string (string &optional optional) "Check that the text following point matches the regexp in STRING." (if (looking-at string) - (goto-char (match-end 0)) + (progn (goto-char (match-end 0)) + (when (vhdl-in-literal) + (end-of-line)) + (point)) (unless optional (throw 'parse (format "ERROR: Syntax error near line %s, expecting \"%s\"" (vhdl-current-line) string))) @@ -10919,7 +11288,9 @@ port-dir (car port-dir-car)) (setcar port-dir-car (cond ((equal port-dir "in") "out") + ((equal port-dir "IN") "OUT") ((equal port-dir "out") "in") + ((equal port-dir "OUT") "IN") (t port-dir))) (setq port-list (cdr port-list))) (setq vhdl-port-reversed-direction (not vhdl-port-reversed-direction)) @@ -10949,20 +11320,23 @@ (message "Reading port of %s \"%s\"..." decl-type name) (vhdl-forward-syntactic-ws) ;; parse generic clause - (when (vhdl-parse-string "generic[ \t\n]*(" t) + (when (vhdl-parse-string "generic[ \t\n\r\f]*(" t) ;; parse group comment and spacing (setq group-comment (vhdl-parse-group-comment)) - (setq end-of-list (vhdl-parse-string ")[ \t\n]*;[ \t\n]*" t)) + (setq end-of-list (vhdl-parse-string ")[ \t\n\r\f]*;[ \t\n\r\f]*" t)) (while (not end-of-list) ;; parse names (accept extended identifiers) - (vhdl-parse-string "\\(\\w+\\|\\\\[^\\]+\\\\\\)[ \t\n]*") + (vhdl-parse-string "\\(\\\\[^\\]+\\\\\\|\\w+\\)[ \t\n\r\f]*") (setq names (list (match-string-no-properties 1))) - (while (vhdl-parse-string ",[ \t\n]*\\(\\w+\\)[ \t\n]*" t) + (while (vhdl-parse-string ",[ \t\n\r\f]*\\(\\\\[^\\]+\\\\\\|\\w+\\)[ \t\n\r\f]*" t) (setq names (append names (list (match-string-no-properties 1))))) ;; parse type - (vhdl-parse-string ":[ \t\n]*\\([^():;\n]+\\)") + (vhdl-parse-string ":[ \t\n\r\f]*\\([^():;\n]+\\)") (setq type (match-string-no-properties 1)) + (when (vhdl-in-comment-p) ; if stuck in comment + (setq type (concat type (and (vhdl-parse-string ".*") + (match-string-no-properties 0))))) (setq comment nil) (while (looking-at "(") (setq type @@ -10980,7 +11354,7 @@ (setq type (substring type 0 (match-end 1))) ;; parse initialization expression (setq init nil) - (when (vhdl-parse-string ":=[ \t\n]*" t) + (when (vhdl-parse-string ":=[ \t\n\r\f]*" t) (vhdl-parse-string "\\([^();\n]*\\)") (setq init (match-string-no-properties 1)) (while (looking-at "(") @@ -11014,28 +11388,31 @@ ;; parse group comment and spacing (setq group-comment (vhdl-parse-group-comment)))) ;; parse port clause - (when (vhdl-parse-string "port[ \t\n]*(" t) + (when (vhdl-parse-string "port[ \t\n\r\f]*(" t) ;; parse group comment and spacing (setq group-comment (vhdl-parse-group-comment)) - (setq end-of-list (vhdl-parse-string ")[ \t\n]*;[ \t\n]*" t)) + (setq end-of-list (vhdl-parse-string ")[ \t\n\r\f]*;[ \t\n\r\f]*" t)) (while (not end-of-list) ;; parse object (setq object - (and (vhdl-parse-string "\\<\\(signal\\|quantity\\|terminal\\)\\>[ \t\n]*" t) + (and (vhdl-parse-string "\\<\\(signal\\|quantity\\|terminal\\)\\>[ \t\n\r\f]*" t) (match-string-no-properties 1))) ;; parse names (accept extended identifiers) - (vhdl-parse-string "\\(\\w+\\|\\\\[^\\]+\\\\\\)[ \t\n]*") + (vhdl-parse-string "\\(\\\\[^\\]+\\\\\\|\\w+\\)[ \t\n\r\f]*") (setq names (list (match-string-no-properties 1))) - (while (vhdl-parse-string ",[ \t\n]*\\(\\w+\\|\\\\[^\\]+\\\\\\)[ \t\n]*" t) + (while (vhdl-parse-string ",[ \t\n\r\f]*\\(\\\\[^\\]+\\\\\\|\\w+\\)[ \t\n\r\f]*" t) (setq names (append names (list (match-string-no-properties 1))))) ;; parse direction - (vhdl-parse-string ":[ \t\n]*") + (vhdl-parse-string ":[ \t\n\r\f]*") (setq direct - (and (vhdl-parse-string "\\<\\(in\\|out\\|inout\\|buffer\\|linkage\\)\\>[ \t\n]+" t) + (and (vhdl-parse-string "\\<\\(in\\|out\\|inout\\|buffer\\|linkage\\)\\>[ \t\n\r\f]+" t) (match-string-no-properties 1))) ;; parse type (vhdl-parse-string "\\([^();\n]+\\)") (setq type (match-string-no-properties 1)) + (when (vhdl-in-comment-p) ; if stuck in comment + (setq type (concat type (and (vhdl-parse-string ".*") + (match-string-no-properties 0))))) (setq comment nil) (while (looking-at "(") (setq type (concat type @@ -11313,7 +11690,7 @@ (setq port-list (cdr port-list)) (insert (if port-list "," ");")) ;; paste comment - (when (or vhdl-include-direction-comments + (when (or (and vhdl-include-direction-comments (nth 2 port)) vhdl-include-type-comments (and vhdl-include-port-comments (nth 4 port))) (vhdl-comment-insert-inline @@ -11454,12 +11831,17 @@ ;; paste type (insert " : " (nth 3 port)) ;; paste initialization (inputs only) - (when (and initialize (equal "IN" (upcase (nth 2 port)))) - (insert " := " (if (string-match "(.+)" (nth 3 port)) - "(others => '0')" "'0'"))) + (when (and initialize (nth 2 port) (equal "IN" (upcase (nth 2 port)))) + (insert " := " + (cond ((string-match "integer" (nth 3 port)) "0") + ((string-match "natural" (nth 3 port)) "0") + ((string-match "positive" (nth 3 port)) "0") + ((string-match "real" (nth 3 port)) "0.0") + ((string-match "(.+)" (nth 3 port)) "(others => '0')") + (t "'0'")))) (insert ";") ;; paste comment - (when (or vhdl-include-direction-comments + (when (or (and vhdl-include-direction-comments (nth 2 port)) (and vhdl-include-port-comments (nth 4 port))) (vhdl-comment-insert-inline (concat @@ -11495,8 +11877,14 @@ (setq name (car (nth 0 port))) (insert (vhdl-replace-string vhdl-actual-port-name name)) ;; paste initialization - (insert " <= " (if (string-match "(.+)" (nth 3 port)) - "(others => '0')" "'0'") ";")) + (insert " <= " + (cond ((string-match "integer" (nth 3 port)) "0") + ((string-match "natural" (nth 3 port)) "0") + ((string-match "positive" (nth 3 port)) "0") + ((string-match "real" (nth 3 port)) "0.0") + ((string-match "(.+)" (nth 3 port)) "(others => '0')") + (t "'0'")) + ";")) (setq port-list (cdr port-list)) (when (and port-list (equal "IN" (upcase (nth 2 (car port-list))))) @@ -11609,7 +11997,9 @@ ;; paste custom declarations (unless (equal "" vhdl-testbench-declarations) (insert "\n") - (vhdl-insert-string-or-file vhdl-testbench-declarations)) + (setq position (point)) + (vhdl-insert-string-or-file vhdl-testbench-declarations) + (vhdl-indent-region position (point))) (setq position (point)) (insert "\n\n") (vhdl-comment-display-line) (insert "\n") @@ -11638,7 +12028,9 @@ ;; paste custom statements (unless (equal "" vhdl-testbench-statements) (insert "\n") - (vhdl-insert-string-or-file vhdl-testbench-statements)) + (setq position (point)) + (vhdl-insert-string-or-file vhdl-testbench-statements) + (vhdl-indent-region position (point))) (insert "\n") (indent-to vhdl-basic-offset) (unless (eq vhdl-testbench-create-files 'none) @@ -11707,8 +12099,8 @@ ;; check if within function declaration (setq pos (point)) (end-of-line) - (when (looking-at "[ \t\n]*\\((\\|;\\|is\\>\\)") (goto-char (match-end 0))) - (unless (and (re-search-backward "^\\s-*\\(\\(procedure\\)\\|\\(\\(pure\\|impure\\)\\s-+\\)?function\\)\\s-+\\(\"?\\w+\"?\\)[ \t\n]*\\(\\((\\)\\|;\\|is\\>\\)" nil t) + (when (looking-at "[ \t\n\r\f]*\\((\\|;\\|is\\>\\)") (goto-char (match-end 0))) + (unless (and (re-search-backward "^\\s-*\\(\\(procedure\\)\\|\\(\\(pure\\|impure\\)\\s-+\\)?function\\)\\s-+\\(\"?\\w+\"?\\)[ \t\n\r\f]*\\(\\((\\)\\|;\\|is\\>\\)" nil t) (goto-char (match-end 0)) (save-excursion (backward-char) (forward-sexp) @@ -11721,21 +12113,21 @@ ;; parse parameter list (setq group-comment (vhdl-parse-group-comment)) (setq end-of-list (or end-of-list - (vhdl-parse-string ")[ \t\n]*\\(;\\|\\(is\\|return\\)\\>\\)" t))) + (vhdl-parse-string ")[ \t\n\r\f]*\\(;\\|\\(is\\|return\\)\\>\\)" t))) (while (not end-of-list) ;; parse object (setq object - (and (vhdl-parse-string "\\(constant\\|signal\\|variable\\|file\\|quantity\\|terminal\\)[ \t\n]*" t) + (and (vhdl-parse-string "\\(constant\\|signal\\|variable\\|file\\|quantity\\|terminal\\)[ \t\n\r\f]*" t) (match-string-no-properties 1))) ;; parse names (accept extended identifiers) - (vhdl-parse-string "\\(\\w+\\|\\\\[^\\]+\\\\\\)[ \t\n]*") + (vhdl-parse-string "\\(\\\\[^\\]+\\\\\\|\\w+\\)[ \t\n\r\f]*") (setq names (list (match-string-no-properties 1))) - (while (vhdl-parse-string ",[ \t\n]*\\(\\w+\\|\\\\[^\\]+\\\\\\)[ \t\n]*" t) + (while (vhdl-parse-string ",[ \t\n\r\f]*\\(\\\\[^\\]+\\\\\\|\\w+\\)[ \t\n\r\f]*" t) (setq names (append names (list (match-string-no-properties 1))))) ;; parse direction - (vhdl-parse-string ":[ \t\n]*") + (vhdl-parse-string ":[ \t\n\r\f]*") (setq direct - (and (vhdl-parse-string "\\(in\\|out\\|inout\\|buffer\\|linkage\\)[ \t\n]+" t) + (and (vhdl-parse-string "\\(in\\|out\\|inout\\|buffer\\|linkage\\)[ \t\n\r\f]+" t) (match-string-no-properties 1))) ;; parse type (vhdl-parse-string "\\([^():;\n]+\\)") @@ -11757,7 +12149,7 @@ (setq type (substring type 0 (match-end 1))) ;; parse initialization expression (setq init nil) - (when (vhdl-parse-string ":=[ \t\n]*" t) + (when (vhdl-parse-string ":=[ \t\n\r\f]*" t) (vhdl-parse-string "\\([^();\n]*\\)") (setq init (match-string-no-properties 1)) (while (looking-at "(") @@ -11787,7 +12179,7 @@ (vhdl-parse-string "\\(;\\|\\(is\\|\\(return\\)\\)\\>\\)\\s-*") ;; parse return type (when (match-string 3) - (vhdl-parse-string "[ \t\n]*\\(.+\\)[ \t\n]*\\(;\\|is\\>\\)\\s-*") + (vhdl-parse-string "[ \t\n\r\f]*\\(.+\\)[ \t\n\r\f]*\\(;\\|is\\>\\)\\s-*") (setq return-type (match-string-no-properties 1)) (when (and return-type (string-match "\\(\\s-*--\\s-*\\)\\(.*\\)" return-type)) @@ -12015,17 +12407,15 @@ (defalias 'he-list-beg 'vhdl-he-list-beg)) ;; function for expanding abbrevs and dabbrevs -(defun vhdl-expand-abbrev (arg)) -(fset 'vhdl-expand-abbrev (make-hippie-expand-function - '(try-expand-dabbrev - try-expand-dabbrev-all-buffers - vhdl-try-expand-abbrev))) +(defalias 'vhdl-expand-abbrev (make-hippie-expand-function + '(try-expand-dabbrev + try-expand-dabbrev-all-buffers + vhdl-try-expand-abbrev))) ;; function for expanding parenthesis -(defun vhdl-expand-paren (arg)) -(fset 'vhdl-expand-paren (make-hippie-expand-function - '(try-expand-list - try-expand-list-all-buffers))) +(defalias 'vhdl-expand-paren (make-hippie-expand-function + '(try-expand-list + try-expand-list-all-buffers))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Case fixing @@ -12049,7 +12439,7 @@ (< vhdl-progress-interval (- (nth 1 (current-time)) last-update))) (message "Fixing case... (%2d%s)" - (+ (* count 25) (/ (* 25 (- (point) beg)) (- end beg))) + (+ (* count 20) (/ (* 20 (- (point) beg)) (- end beg))) "%") (setq last-update (nth 1 (current-time))))) (goto-char end))))) @@ -12066,6 +12456,8 @@ beg end vhdl-upper-case-attributes (concat "'" vhdl-attributes-regexp) 2) (vhdl-fix-case-region-1 beg end vhdl-upper-case-enum-values vhdl-enum-values-regexp 3) + (vhdl-fix-case-region-1 + beg end vhdl-upper-case-constants vhdl-constants-regexp 4) (when vhdl-progress-interval (message "Fixing case...done"))) (defun vhdl-fix-case-buffer () @@ -12091,6 +12483,9 @@ (upcase-word 1)) (when (and vhdl-upper-case-enum-values (looking-at vhdl-enum-values-regexp)) + (upcase-word 1)) + (when (and vhdl-upper-case-constants + (looking-at vhdl-constants-regexp)) (upcase-word 1))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -12205,6 +12600,9 @@ (interactive) (let ((no-stats 0) (no-code-lines 0) + (no-empty-lines 0) + (no-comm-lines 0) + (no-comments 0) (no-lines (count-lines (point-min) (point-max)))) (save-excursion ;; count statements @@ -12218,15 +12616,40 @@ (while (not (eobp)) (unless (looking-at "^\\s-*\\(--.*\\)?$") (setq no-code-lines (1+ no-code-lines))) - (beginning-of-line 2))) + (beginning-of-line 2)) + ;; count empty lines + (goto-char (point-min)) + (while (and (re-search-forward "^\\s-*$" nil t) + (not (eq (point) (point-max)))) + (if (match-string 1) + (goto-char (match-end 1)) + (setq no-empty-lines (1+ no-empty-lines)) + (unless (eq (point) (point-max)) + (forward-char)))) + ;; count comment-only lines + (goto-char (point-min)) + (while (re-search-forward "^\\s-*--.*" nil t) + (if (match-string 1) + (goto-char (match-end 1)) + (setq no-comm-lines (1+ no-comm-lines)))) + ;; count comments + (goto-char (point-min)) + (while (re-search-forward "--.*" nil t) + (if (match-string 1) + (goto-char (match-end 1)) + (setq no-comments (1+ no-comments))))) ;; print results (message "\n\ File statistics: \"%s\"\n\ ---------------------\n\ -# statements : %5d\n\ -# code lines : %5d\n\ -# total lines : %5d\n\ " - (buffer-file-name) no-stats no-code-lines no-lines) +# statements : %5d\n\ +# code lines : %5d\n\ +# empty lines : %5d\n\ +# comment lines : %5d\n\ +# comments : %5d\n\ +# total lines : %5d\n\ " + (buffer-file-name) no-stats no-code-lines no-empty-lines + no-comm-lines no-comments no-lines) (unless vhdl-emacs-21 (vhdl-show-messages)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -12390,18 +12813,18 @@ (concat "\\(^\\)\\s-*\\(" ;; generic/port clause - "\\(generic\\|port\\)[ \t\n]*(\\|" + "\\(generic\\|port\\)[ \t\n\r\f]*(\\|" ;; component "component\\>\\|" ;; component instantiation - "\\(\\w\\|\\s_\\)+[ \t\n]*:[ \t\n]*" - "\\(\\(component\\|configuration\\|entity\\)[ \t\n]+\\)?" - "\\(\\w\\|\\s_\\)+\\([ \t\n]*(\\(\\w\\|\\s_\\)+)\\)?[ \t\n]*" - "\\(generic\\|port\\)[ \t\n]+map[ \t\n]*(\\|" + "\\(\\w\\|\\s_\\)+[ \t\n\r\f]*:[ \t\n\r\f]*" + "\\(\\(component\\|configuration\\|entity\\)[ \t\n\r\f]+\\)?" + "\\(\\w\\|\\s_\\)+\\([ \t\n\r\f]*(\\(\\w\\|\\s_\\)+)\\)?[ \t\n\r\f]*" + "\\(generic\\|port\\)[ \t\n\r\f]+map[ \t\n\r\f]*(\\|" ;; subprogram "\\(function\\|procedure\\)\\>\\|" ;; process, block - "\\(\\(\\w\\|\\s_\\)+[ \t\n]*:[ \t\n]*\\)?\\(process\\|block\\)\\>\\|" + "\\(\\(\\w\\|\\s_\\)+[ \t\n\r\f]*:[ \t\n\r\f]*\\)?\\(process\\|block\\)\\>\\|" ;; configuration declaration "configuration\\>" "\\)") @@ -12414,7 +12837,7 @@ (beginning-of-line) (cond ;; generic/port clause - ((looking-at "^\\s-*\\(generic\\|port\\)[ \t\n]*(") + ((looking-at "^\\s-*\\(generic\\|port\\)[ \t\n\r\f]*(") (goto-char (match-end 0)) (backward-char) (forward-sexp)) @@ -12424,16 +12847,16 @@ ;; component instantiation ((looking-at (concat - "^\\s-*\\w+\\s-*:[ \t\n]*" - "\\(\\(component\\|configuration\\|entity\\)[ \t\n]+\\)?" - "\\w+\\(\\s-*(\\w+)\\)?[ \t\n]*" - "\\(generic\\|port\\)\\s-+map[ \t\n]*(")) + "^\\s-*\\w+\\s-*:[ \t\n\r\f]*" + "\\(\\(component\\|configuration\\|entity\\)[ \t\n\r\f]+\\)?" + "\\w+\\(\\s-*(\\w+)\\)?[ \t\n\r\f]*" + "\\(generic\\|port\\)\\s-+map[ \t\n\r\f]*(")) (goto-char (match-end 0)) (backward-char) (forward-sexp) (setq pos (point)) (vhdl-forward-syntactic-ws) - (when (looking-at "port\\s-+map[ \t\n]*(") + (when (looking-at "port\\s-+map[ \t\n\r\f]*(") (goto-char (match-end 0)) (backward-char) (forward-sexp) @@ -12585,7 +13008,7 @@ ;; highlight labels of common constructs (list (concat - "^\\s-*\\(\\w+\\)\\s-*:[ \t\n]*\\(\\(" + "^\\s-*\\(\\w+\\)\\s-*:[ \t\n\r\f]*\\(\\(" "assert\\|block\\|case\\|exit\\|for\\|if\\|loop\\|next\\|null\\|" "postponed\\|process\\|" (when (vhdl-standard-p 'ams) "procedural\\|") @@ -12596,14 +13019,14 @@ ;; highlight label and component name of component instantiations (list (concat - "^\\s-*\\(\\w+\\)\\s-*:[ \t\n]*\\(\\w+\\)" - "\\(\\s-*\\(--[^\n]*\\)?$\\|\\s-+\\(generic\\|port\\)\\s-+map\\>\\)") + "^\\s-*\\(\\w+\\)\\s-*:[ \t\n\r\f]*\\(\\w+\\)[ \t\n\r\f]*" + "\\(--[^\n]*[ \t\n\r\f]+\\)*\\(generic\\|port\\)\\s-+map\\>") '(1 font-lock-function-name-face) '(2 font-lock-function-name-face)) ;; highlight label and instantiated unit of component instantiations (list (concat - "^\\s-*\\(\\w+\\)\\s-*:[ \t\n]*" + "^\\s-*\\(\\w+\\)\\s-*:[ \t\n\r\f]*" "\\(component\\|configuration\\|entity\\)\\s-+" "\\(\\w+\\)\\(\\.\\(\\w+\\)\\)?\\(\\s-*(\\(\\w+\\))\\)?") '(1 font-lock-function-name-face) '(3 font-lock-function-name-face) @@ -12638,7 +13061,7 @@ (list (concat "^\\s-*for\\s-+\\(\\w+\\(,\\s-*\\w+\\)*\\)\\>\\s-*" - "\\(:[ \t\n]*\\(\\w+\\)\\|[^i \t]\\)") + "\\(:[ \t\n\r\f]*\\(\\w+\\)\\|[^i \t]\\)") '(1 font-lock-function-name-face) '(4 font-lock-function-name-face nil t)) ;; highlight names in library clauses @@ -12662,8 +13085,8 @@ ;; highlight type/nature name in (sub)type/(sub)nature declarations (list (concat - "^\\s-*\\(sub\\)?\\(nature\\|type\\)\\s-+\\(\\w+\\)") - 3 'font-lock-type-face) + "^\\s-*\\(\\(sub\\)?\\(nature\\|type\\)\\|end\\s-+\\(record\\|protected\\)\\)\\s-+\\(\\w+\\)") + 5 'font-lock-type-face) ;; highlight signal/variable/constant declaration names (list "\\(:[^=]\\)" @@ -12867,6 +13290,7 @@ (list vhdl-functions-regexp 1 'vhdl-font-lock-function-face) (list vhdl-packages-regexp 1 'vhdl-font-lock-function-face) (list vhdl-enum-values-regexp 1 'vhdl-font-lock-enumvalue-face) + (list vhdl-constants-regexp 1 'font-lock-constant-face) (list vhdl-keywords-regexp 1 'font-lock-keyword-face))) ;; highlight words with special syntax. (setq vhdl-font-lock-keywords-3 @@ -12875,9 +13299,10 @@ (while syntax-alist (setq keywords (cons - (cons (concat "\\<\\(" (nth 1 (car syntax-alist)) "\\)\\>") + (list (concat "\\(" (nth 1 (car syntax-alist)) "\\)") 1 (vhdl-function-name - "vhdl-font-lock" (nth 0 (car syntax-alist)) "face")) + "vhdl-font-lock" (nth 0 (car syntax-alist)) "face") + (nth 4 (car syntax-alist))) keywords)) (setq syntax-alist (cdr syntax-alist))) keywords)) @@ -13066,7 +13491,7 @@ (when (re-search-backward "^[ \t]*\\(architecture\\|configuration\\|entity\\|package\\)\\>" nil t) (while (and (re-search-backward "^[ \t]*\\(end\\|use\\)\\>" nil t) (equal "USE" (upcase (match-string 1)))) - (when (looking-at "^[ \t]*use[ \t\n]*\\(\\w+\\)\\.\\(\\w+\\)\\.\\w+") + (when (looking-at "^[ \t]*use[ \t\n\r\f]*\\(\\w+\\)\\.\\(\\w+\\)\\.\\w+") (setq lib-alist (cons (cons (match-string-no-properties 1) (vhdl-match-string-downcase 2)) lib-alist)))))) @@ -13140,7 +13565,7 @@ (setq big-files t)) ;; scan for entities (goto-char (point-min)) - (while (re-search-forward "^[ \t]*entity[ \t\n]+\\(\\w+\\)[ \t\n]+is\\>" nil t) + (while (re-search-forward "^[ \t]*entity[ \t\n\r\f]+\\(\\w+\\)[ \t\n\r\f]+is\\>" nil t) (let* ((ent-name (match-string-no-properties 1)) (ent-key (downcase ent-name)) (ent-entry (aget ent-alist ent-key t)) @@ -13157,7 +13582,7 @@ lib-alist))))) ;; scan for architectures (goto-char (point-min)) - (while (re-search-forward "^[ \t]*architecture[ \t\n]+\\(\\w+\\)[ \t\n]+of[ \t\n]+\\(\\w+\\)[ \t\n]+is\\>" nil t) + (while (re-search-forward "^[ \t]*architecture[ \t\n\r\f]+\\(\\w+\\)[ \t\n\r\f]+of[ \t\n\r\f]+\\(\\w+\\)[ \t\n\r\f]+is\\>" nil t) (let* ((arch-name (match-string-no-properties 1)) (arch-key (downcase arch-name)) (ent-name (match-string-no-properties 2)) @@ -13183,7 +13608,7 @@ arch-key (nth 5 ent-entry)))))) ;; scan for configurations (goto-char (point-min)) - (while (re-search-forward "^[ \t]*configuration[ \t\n]+\\(\\w+\\)[ \t\n]+of[ \t\n]+\\(\\w+\\)[ \t\n]+is\\>" nil t) + (while (re-search-forward "^[ \t]*configuration[ \t\n\r\f]+\\(\\w+\\)[ \t\n\r\f]+of[ \t\n\r\f]+\\(\\w+\\)[ \t\n\r\f]+is\\>" nil t) (let* ((conf-name (match-string-no-properties 1)) (conf-key (downcase conf-name)) (conf-entry (aget conf-alist conf-key t)) @@ -13195,7 +13620,7 @@ arch-key comp-conf-list inst-key-list inst-comp-key inst-ent-key inst-arch-key inst-conf-key inst-lib-key) - (when (vhdl-re-search-forward "\\" nil t) + (while (re-search-forward "^[ \t]*package[ \t\n\r\f]+\\(body[ \t\n\r\f]+\\)?\\(\\w+\\)[ \t\n\r\f]+is\\>" nil t) (let* ((pack-name (match-string-no-properties 2)) (pack-key (downcase pack-name)) (is-body (match-string-no-properties 1)) @@ -13250,7 +13675,7 @@ ;; scan for context clauses (setq lib-alist (vhdl-scan-context-clause)) ;; scan for component and subprogram declarations/bodies - (while (re-search-forward "^[ \t]*\\(component\\|function\\|procedure\\)[ \t\n]+\\(\\w+\\|\".*\"\\)" end-of-unit t) + (while (re-search-forward "^[ \t]*\\(component\\|function\\|procedure\\)[ \t\n\r\f]+\\(\\w+\\|\".*\"\\)" end-of-unit t) (if (equal (upcase (match-string 1)) "COMPONENT") (setq comp-name (match-string-no-properties 2) comp-alist @@ -13286,7 +13711,7 @@ (setq big-files t)) ;; scan for architectures (goto-char (point-min)) - (while (re-search-forward "^[ \t]*architecture[ \t\n]+\\(\\w+\\)[ \t\n]+of[ \t\n]+\\(\\w+\\)[ \t\n]+is\\>" nil t) + (while (re-search-forward "^[ \t]*architecture[ \t\n\r\f]+\\(\\w+\\)[ \t\n\r\f]+of[ \t\n\r\f]+\\(\\w+\\)[ \t\n\r\f]+is\\>" nil t) (let* ((ent-name (match-string-no-properties 2)) (ent-key (downcase ent-name)) (arch-name (match-string-no-properties 1)) @@ -13300,12 +13725,12 @@ inst-alist inst-path) ;; scan for contained instantiations (while (and (re-search-forward - (concat "^[ \t]*\\(\\w+\\)[ \t\n]*:[ \t\n]*\\(" - "\\(\\w+\\)[ \t\n]+\\(--[^\n]*\n[ \t\n]*\\)*\\(generic\\|port\\)[ \t\n]+map\\>\\|" - "component[ \t\n]+\\(\\w+\\)\\|" - "\\(\\(entity\\)\\|configuration\\)[ \t\n]+\\(\\(\\w+\\)\\.\\)?\\(\\w+\\)\\([ \t\n]*(\\(\\w+\\))\\)?\\|" + (concat "^[ \t]*\\(\\w+\\)[ \t\n\r\f]*:[ \t\n\r\f]*\\(" + "\\(\\w+\\)[ \t\n\r\f]+\\(--[^\n]*\n[ \t\n\r\f]*\\)*\\(generic\\|port\\)[ \t\n\r\f]+map\\>\\|" + "component[ \t\n\r\f]+\\(\\w+\\)\\|" + "\\(\\(entity\\)\\|configuration\\)[ \t\n\r\f]+\\(\\(\\w+\\)\\.\\)?\\(\\w+\\)\\([ \t\n\r\f]*(\\(\\w+\\))\\)?\\|" "\\(\\(for\\|if\\)\\>[^;:]+\\\\|block\\>\\)\\)\\|" - "\\(^[ \t]*end[ \t\n]+\\(generate\\|block\\)\\>\\)") end-of-unit t) + "\\(^[ \t]*end[ \t\n\r\f]+\\(generate\\|block\\)\\>\\)") end-of-unit t) (or (not limit-hier-inst-no) (<= (setq inst-no (1+ inst-no)) limit-hier-inst-no))) @@ -13349,8 +13774,8 @@ ;; scan for contained configuration specifications (goto-char beg-of-unit) (while (re-search-forward - (concat "^[ \t]*for[ \t\n]+\\(\\w+\\([ \t\n]*,[ \t\n]*\\w+\\)*\\)[ \t\n]*:[ \t\n]*\\(\\w+\\)[ \t\n]+\\(--[^\n]*\n[ \t\n]*\\)*" - "use[ \t\n]+\\(\\(entity\\)\\|configuration\\)[ \t\n]+\\(\\(\\w+\\)\\.\\)?\\(\\w+\\)\\([ \t\n]*(\\(\\w+\\))\\)?") end-of-unit t) + (concat "^[ \t]*for[ \t\n\r\f]+\\(\\w+\\([ \t\n\r\f]*,[ \t\n\r\f]*\\w+\\)*\\)[ \t\n\r\f]*:[ \t\n\r\f]*\\(\\w+\\)[ \t\n\r\f]+\\(--[^\n]*\n[ \t\n\r\f]*\\)*" + "use[ \t\n\r\f]+\\(\\(entity\\)\\|configuration\\)[ \t\n\r\f]+\\(\\(\\w+\\)\\.\\)?\\(\\w+\\)\\([ \t\n\r\f]*(\\(\\w+\\))\\)?") end-of-unit t) (let* ((inst-comp-name (match-string-no-properties 3)) (inst-ent-key (and (match-string 6) @@ -13362,7 +13787,7 @@ (inst-lib-key (vhdl-match-string-downcase 8)) (inst-key-list (split-string (vhdl-match-string-downcase 1) - "[ \t\n]*,[ \t\n]*")) + "[ \t\n\r\f]*,[ \t\n\r\f]*")) (tmp-inst-alist inst-alist) inst-entry) (while tmp-inst-alist @@ -15347,7 +15772,7 @@ (read-from-minibuffer "architecture name: " nil vhdl-minibuffer-local-map) (vhdl-replace-string vhdl-compose-architecture-name ent-name))) - ent-file-name arch-file-name ent-buffer arch-buffer project) + ent-file-name arch-file-name ent-buffer arch-buffer project end-pos) (message "Creating component \"%s(%s)\"..." ent-name arch-name) ;; open entity file (unless (eq vhdl-compose-create-files 'none) @@ -15364,6 +15789,7 @@ ;; insert header (if vhdl-compose-include-header (progn (vhdl-template-header) + (setq end-pos (point)) (goto-char (point-max))) (vhdl-comment-display-line) (insert "\n\n")) ;; insert library clause @@ -15390,6 +15816,7 @@ ;; open architecture file (if (not (eq vhdl-compose-create-files 'separate)) (insert "\n") + (goto-char (or end-pos (point-min))) (setq ent-buffer (current-buffer)) (setq arch-file-name (concat (vhdl-replace-string vhdl-architecture-file-name @@ -15434,7 +15861,7 @@ (if (and vhdl-compose-include-header (not (equal vhdl-file-footer ""))) (vhdl-template-footer) (vhdl-comment-display-line) (insert "\n")) - (goto-char (point-min)) + (goto-char (or end-pos (point-min))) (setq arch-buffer (current-buffer)) (when ent-buffer (set-buffer ent-buffer) (save-buffer)) (set-buffer arch-buffer) (save-buffer) @@ -15453,8 +15880,8 @@ (error "ERROR: No port has been read") (save-excursion (vhdl-prepare-search-2 - (unless (or (re-search-backward "^architecture[ \t\n]+\\w+[ \t\n]+of[ \t\n]+\\(\\w+\\)[ \t\n]+is\\>" nil t) - (re-search-forward "^architecture[ \t\n]+\\w+[ \t\n]+of[ \t\n]+\\(\\w+\\)[ \t\n]+is\\>" nil t)) + (unless (or (re-search-backward "^architecture[ \t\n\r\f]+\\w+[ \t\n\r\f]+of[ \t\n\r\f]+\\(\\w+\\)[ \t\n\r\f]+is\\>" nil t) + (re-search-forward "^architecture[ \t\n\r\f]+\\w+[ \t\n\r\f]+of[ \t\n\r\f]+\\(\\w+\\)[ \t\n\r\f]+is\\>" nil t)) (error "ERROR: No architecture found")) (let* ((ent-name (match-string 1)) (ent-file-name @@ -15471,13 +15898,13 @@ (car vhdl-port-list) "\\>") nil t))) (re-search-forward "^begin\\>" nil) (beginning-of-line) - (skip-chars-backward " \t\n") + (skip-chars-backward " \t\n\r\f") (insert "\n\n") (indent-to vhdl-basic-offset) (vhdl-port-paste-component t)) ;; place component instantiation (re-search-forward "^end\\>" nil) (beginning-of-line) - (skip-chars-backward " \t\n") + (skip-chars-backward " \t\n\r\f") (insert "\n\n") (indent-to vhdl-basic-offset) (vhdl-port-paste-instance nil t t) ;; place use clause for used packages @@ -15486,7 +15913,7 @@ (when (file-exists-p ent-file-name) (find-file ent-file-name)) (goto-char (point-min)) - (unless (re-search-forward (concat "^entity[ \t\n]+" ent-name "[ \t\n]+is\\>") nil t) + (unless (re-search-forward (concat "^entity[ \t\n\r\f]+" ent-name "[ \t\n\r\f]+is\\>") nil t) (error "ERROR: Entity not found: \"%s\"" ent-name)) (goto-char (match-beginning 0)) (if (and (save-excursion @@ -15505,8 +15932,8 @@ (interactive) (save-excursion (vhdl-prepare-search-2 - (unless (or (re-search-backward "^architecture[ \t\n]+\\w+[ \t\n]+of[ \t\n]+\\(\\w+\\)[ \t\n]+is\\>" nil t) - (re-search-forward "^architecture[ \t\n]+\\w+[ \t\n]+of[ \t\n]+\\(\\w+\\)[ \t\n]+is\\>" nil t)) + (unless (or (re-search-backward "^architecture[ \t\n\r\f]+\\w+[ \t\n\r\f]+of[ \t\n\r\f]+\\(\\w+\\)[ \t\n\r\f]+is\\>" nil t) + (re-search-forward "^architecture[ \t\n\r\f]+\\w+[ \t\n\r\f]+of[ \t\n\r\f]+\\(\\w+\\)[ \t\n\r\f]+is\\>" nil t)) (error "ERROR: No architecture found")) (let* ((ent-name (match-string 1)) (ent-file-name @@ -15532,11 +15959,11 @@ ;; process all instances (goto-char arch-stat-pos) (while (re-search-forward - (concat "^[ \t]*\\(\\w+\\)[ \t\n]*:[ \t\n]*\\(" - "\\(component[ \t\n]+\\)?\\(\\w+\\)" - "[ \t\n]+\\(--[^\n]*\n[ \t\n]*\\)*\\(\\(generic\\)\\|port\\)[ \t\n]+map\\|" - "\\(\\(entity\\)\\|configuration\\)[ \t\n]+\\(\\(\\w+\\)\\.\\)?\\(\\w+\\)\\([ \t\n]*(\\(\\w+\\))\\)?" - "[ \t\n]+\\(--[^\n]*\n[ \t\n]*\\)*\\(\\(generic\\)\\|port\\)[ \t\n]+map\\)[ \t\n]*(") arch-end-pos t) + (concat "^[ \t]*\\(\\w+\\)[ \t\n\r\f]*:[ \t\n\r\f]*\\(" + "\\(component[ \t\n\r\f]+\\)?\\(\\w+\\)" + "[ \t\n\r\f]+\\(--[^\n]*\n[ \t\n\r\f]*\\)*\\(\\(generic\\)\\|port\\)[ \t\n\r\f]+map\\|" + "\\(\\(entity\\)\\|configuration\\)[ \t\n\r\f]+\\(\\(\\w+\\)\\.\\)?\\(\\w+\\)\\([ \t\n\r\f]*(\\(\\w+\\))\\)?" + "[ \t\n\r\f]+\\(--[^\n]*\n[ \t\n\r\f]*\\)*\\(\\(generic\\)\\|port\\)[ \t\n\r\f]+map\\)[ \t\n\r\f]*(") arch-end-pos t) (setq inst-name (match-string-no-properties 1) comp-name (match-string-no-properties 4) comp-ent-name (match-string-no-properties 12) @@ -15548,7 +15975,7 @@ (when vhdl-use-components-package pack-file-name) t (save-excursion (goto-char (point-min)) - (unless (re-search-forward (concat "^\\s-*component[ \t\n]+" comp-name "\\>") nil t) + (unless (re-search-forward (concat "^\\s-*component[ \t\n\r\f]+" comp-name "\\>") nil t) (error "ERROR: Component declaration not found: \"%s\"" comp-name)) (vhdl-port-copy))) ;; ... from entity declaration (direct instantiation) @@ -15559,7 +15986,7 @@ comp-ent-file-name t (save-excursion (goto-char (point-min)) - (unless (re-search-forward (concat "^\\s-*entity[ \t\n]+" comp-ent-name "\\>") nil t) + (unless (re-search-forward (concat "^\\s-*entity[ \t\n\r\f]+" comp-ent-name "\\>") nil t) (error "ERROR: Entity declaration not found: \"%s\"" comp-ent-name)) (vhdl-port-copy)))) (vhdl-port-flatten t) @@ -15571,7 +15998,7 @@ (when has-generic ;; process all constants in generic map (vhdl-forward-syntactic-ws) - (while (vhdl-parse-string "\\(\\(\\w+\\)[ \t\n]*=>[ \t\n]*\\)?\\(\\w+\\),?" t) + (while (vhdl-parse-string "\\(\\(\\w+\\)[ \t\n\r\f]*=>[ \t\n\r\f]*\\)?\\(\\w+\\),?" t) (setq constant-name (match-string-no-properties 3)) (setq constant-entry (cons constant-name @@ -15589,10 +16016,10 @@ (unless (match-string 1) (setq generic-alist (cdr generic-alist))) (vhdl-forward-syntactic-ws)) - (vhdl-re-search-forward "\\[ \t\n]*\\)?\\(\\w+\\),?" t) + (while (vhdl-parse-string "\\(\\(\\w+\\)[ \t\n\r\f]*=>[ \t\n\r\f]*\\)?\\(\\w+\\),?" t) (setq signal-name (match-string-no-properties 3)) (setq signal-entry (cons signal-name (if (match-string 1) @@ -15638,7 +16065,7 @@ ;; prepare signal insertion (vhdl-goto-marker arch-decl-pos) (forward-line 1) - (re-search-forward "^\\s-*-- Internal signal declarations[ \t\n]*-*\n" arch-stat-pos t) + (re-search-forward "^\\s-*-- Internal signal declarations[ \t\n\r\f]*-*\n" arch-stat-pos t) (setq signal-pos (point-marker)) (while (progn (vhdl-forward-syntactic-ws) (looking-at "signal\\>")) @@ -15649,10 +16076,10 @@ (when (file-exists-p ent-file-name) (find-file ent-file-name)) (goto-char (point-min)) - (unless (re-search-forward (concat "^entity[ \t\n]+" ent-name "[ \t\n]+is\\>") nil t) + (unless (re-search-forward (concat "^entity[ \t\n\r\f]+" ent-name "[ \t\n\r\f]+is\\>") nil t) (error "ERROR: Entity not found: \"%s\"" ent-name)) ;; prepare generic clause insertion - (unless (and (re-search-forward "\\(^\\s-*generic[ \t\n]*(\\)\\|^end\\>" nil t) + (unless (and (re-search-forward "\\(^\\s-*generic[ \t\n\r\f]*(\\)\\|^end\\>" nil t) (match-string 1)) (goto-char (match-beginning 0)) (indent-to vhdl-basic-offset) @@ -15670,7 +16097,7 @@ (setq generic-beg-pos (point-marker) generic-pos (point-marker) generic-inst-pos (point-marker) generic-end-pos (point-marker)) ;; prepare port clause insertion - (unless (and (re-search-forward "\\(^\\s-*port[ \t\n]*(\\)\\|^end\\>" nil t) + (unless (and (re-search-forward "\\(^\\s-*port[ \t\n\r\f]*(\\)\\|^end\\>" nil t) (match-string 1)) (goto-char (match-beginning 0)) (indent-to vhdl-basic-offset) @@ -15894,7 +16321,8 @@ (message "Generating components package \"%s\"...done\n File created: \"%s\"" pack-name pack-file-name))) -(defun vhdl-compose-configuration-architecture (ent-name arch-name inst-alist +(defun vhdl-compose-configuration-architecture (ent-name arch-name ent-alist + conf-alist inst-alist &optional insert-conf) "Generate block configuration for architecture." (let ((margin (current-indentation)) @@ -15970,7 +16398,7 @@ (nth 3 ent-entry)) (indent-to (+ margin vhdl-basic-offset)) (vhdl-compose-configuration-architecture - (nth 0 ent-entry) arch-name + (nth 0 ent-entry) arch-name ent-alist conf-alist (nth 3 (aget (nth 3 ent-entry) (downcase arch-name) t)))))) ;; insert component configuration end (indent-to margin) @@ -16052,7 +16480,8 @@ (vhdl-insert-keyword " IS\n") (indent-to vhdl-basic-offset) ;; insert block configuration (for architecture) - (vhdl-compose-configuration-architecture ent-name arch-name inst-alist t) + (vhdl-compose-configuration-architecture + ent-name arch-name ent-alist conf-alist inst-alist t) (vhdl-insert-keyword "END ") (insert conf-name ";") (when conf-file-name ;; insert footer and save @@ -16072,6 +16501,9 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; (using `compile.el') +(defvar vhdl-compile-post-command "" + "String appended to compile command after file name.") + (defun vhdl-makefile-name () "Return the Makefile name of the current project or the current compiler if no project is defined." @@ -16226,9 +16658,11 @@ (compiler (or (aget vhdl-compiler-alist vhdl-compiler nil) (error "ERROR: No such compiler: \"%s\"" vhdl-compiler))) (command (nth 0 compiler)) - (file-name (buffer-file-name)) + (default-directory (vhdl-compile-directory)) + (file-name (if vhdl-compile-absolute-path + (buffer-file-name) + (file-relative-name (buffer-file-name)))) (options (vhdl-get-compile-options project compiler file-name)) - (default-directory (vhdl-compile-directory)) compilation-process-setup-function) (unless (file-directory-p default-directory) (error "ERROR: Compile directory does not exist: \"%s\"" default-directory)) @@ -16236,14 +16670,18 @@ (when (string-match " " file-name) (setq file-name (concat "\"" file-name "\""))) ;; print out file name if compiler does not - (setq vhdl-compile-file-name (buffer-file-name)) + (setq vhdl-compile-file-name (if vhdl-compile-absolute-path + (buffer-file-name) + (file-relative-name (buffer-file-name)))) (when (and (= 0 (nth 1 (nth 10 compiler))) (= 0 (nth 1 (nth 11 compiler)))) (setq compilation-process-setup-function 'vhdl-compile-print-file-name)) ;; run compilation (if options (when command - (compile (concat command " " options " " file-name))) + (compile (concat command " " options " " file-name + (unless (equal vhdl-compile-post-command "") + (concat " " vhdl-compile-post-command))))) (vhdl-warning "Your project settings tell me not to compile this file")))) (defvar vhdl-make-target "all" @@ -16551,6 +16989,8 @@ (insert "\n\n# Define compilation command and options\n" "\nCOMPILE = " (nth 0 compiler) "\nOPTIONS = " (vhdl-get-compile-options project compiler nil) + (if (equal vhdl-compile-post-command "") "" + (concat "\nPOST-COMPILE = " vhdl-compile-post-command)) "\n") ;; insert library paths (setq library-directory @@ -16580,16 +17020,16 @@ (setq unit-list tmp-list) ;; insert `make all' rule (insert "\n\n\n# Rule for compiling entire design\n" - "\nall :" - " \\\n\t\tlibrary" + "\n" (nth 0 vhdl-makefile-default-targets) " :" + " \\\n\t\t" (nth 2 vhdl-makefile-default-targets) " \\\n\t\t$(ALL_UNITS)\n") ;; insert `make clean' rule (insert "\n\n# Rule for cleaning entire design\n" - "\nclean : " + "\n" (nth 1 vhdl-makefile-default-targets) " : " "\n\t-rm -f $(ALL_UNITS)\n") ;; insert `make library' rule (insert "\n\n# Rule for creating library directory\n" - "\nlibrary :" + "\n" (nth 2 vhdl-makefile-default-targets) " :" " \\\n\t\t$(LIBRARY-" work-library ")\n" "\n$(LIBRARY-" work-library ") :" "\n\t" @@ -16597,6 +17037,11 @@ (cons "\\(.*\\)\n\\(.*\\)" (nth 5 compiler)) (concat "$(LIBRARY-" work-library ")\n" (vhdl-work-library))) "\n") + ;; insert '.PHONY' declaration + (insert "\n\n.PHONY : " + (nth 0 vhdl-makefile-default-targets) " " + (nth 1 vhdl-makefile-default-targets) " " + (nth 2 vhdl-makefile-default-targets) "\n") ;; insert rule for each library unit (insert "\n\n# Rules for compiling single library units and their subhierarchy\n") (while prim-list @@ -16611,7 +17056,7 @@ (unless (equal unit-key unit-name) (insert " \\\n" unit-name)) (insert " :" - " \\\n\t\tlibrary" + " \\\n\t\t" (nth 2 vhdl-makefile-default-targets) " \\\n\t\t$(UNIT-" work-library "-" unit-key ")") (while second-list (insert " \\\n\t\t$(UNIT-" work-library "-" (car second-list) ")") @@ -16653,7 +17098,9 @@ (if options (insert "\n\t$(COMPILE) " (if (eq options 'default) "$(OPTIONS)" options) " " - (nth 0 rule) "\n") + (nth 0 rule) + (if (equal vhdl-compile-post-command "") "" + " $(POST-COMPILE)") "\n") (setq tmp-list target-list) (while target-list (insert "\n\t@touch $(UNIT-" work-library "-" (car target-list) ")" @@ -16712,6 +17159,7 @@ 'vhdl-compiler-alist 'vhdl-compiler 'vhdl-compile-use-local-error-regexp + 'vhdl-makefile-default-targets 'vhdl-makefile-generation-hook 'vhdl-default-library 'vhdl-standard @@ -16722,6 +17170,7 @@ 'vhdl-upper-case-enum-values 'vhdl-upper-case-constants 'vhdl-use-direct-instantiation + 'vhdl-array-index-record-field-in-sensitivity-list 'vhdl-compose-configuration-name 'vhdl-entity-file-name 'vhdl-architecture-file-name @@ -16812,6 +17261,7 @@ 'vhdl-print-customize-faces 'vhdl-intelligent-tab 'vhdl-indent-syntax-based + 'vhdl-indent-comment-like-next-code-line 'vhdl-word-completion-case-sensitive 'vhdl-word-completion-in-minibuffer 'vhdl-underscore-is-part-of-word @@ -16851,6 +17301,17 @@ (See documentation (`C-c C-h') in section on STRUCTURAL COMPOSITION.) +Key Bindings +------------ + +For Emacs compliance the following key bindings have been changed: + +- `C-c c' -> `C-c C-c' `vhdl-comment-uncomment-region' +- `C-c f' -> `C-c C-i C-f' `vhdl-fontify-buffer' +- `C-c s' -> `C-c C-i C-s' `vhdl-statistics-buffer' +- `C-c C-c ...' -> `C-c C-m ...' `vhdl-compose-...' + + User Options ------------ @@ -16864,6 +17325,12 @@ Specify whether hierarchical configurations should be created. `vhdl-compose-configuration-use-subconfiguration': (new) Specify whether subconfigurations should be used inside configurations. +`vhdl-makefile-default-targets': (new) + Customize names of Makefile default targets. +`vhdl-indent-comment-like-next-code-line': (new) + Specify whether comment lines are indented like following code line. +`vhdl-array-index-record-field-in-sensitivity-list': (new) + Specify whether to include array indices / record fields in sensitivity list. ") @@ -16872,19 +17339,20 @@ Reserved words in VHDL ---------------------- -VHDL'93 (IEEE Std 1076-1993): - `vhdl-93-keywords' : keywords - `vhdl-93-types' : standardized types - `vhdl-93-attributes' : standardized attributes - `vhdl-93-enum-values' : standardized enumeration values - `vhdl-93-functions' : standardized functions - `vhdl-93-packages' : standardized packages and libraries +VHDL'93/02 (IEEE Std 1076-1993/2002): + `vhdl-02-keywords' : keywords + `vhdl-02-types' : standardized types + `vhdl-02-attributes' : standardized attributes + `vhdl-02-enum-values' : standardized enumeration values + `vhdl-02-functions' : standardized functions + `vhdl-02-packages' : standardized packages and libraries -VHDL-AMS (IEEE Std 1076.1): +VHDL-AMS (IEEE Std 1076.1 / 1076.1.1): `vhdl-ams-keywords' : keywords `vhdl-ams-types' : standardized types `vhdl-ams-attributes' : standardized attributes `vhdl-ams-enum-values' : standardized enumeration values + `vhdl-ams-constants' : standardized constants `vhdl-ams-functions' : standardized functions Math Packages (IEEE Std 1076.2):