diff options
| author | Eric S. Raymond | 1992-07-16 21:47:34 +0000 |
|---|---|---|
| committer | Eric S. Raymond | 1992-07-16 21:47:34 +0000 |
| commit | e516799970be4553edae8ca46d5f64852befec77 (patch) | |
| tree | d43d904ac4a87a1be2f4c0375b3f70928f952cf1 /lisp/textmodes | |
| parent | de49a6d37ea9c3111763e38df15e50a7fb9fa5c5 (diff) | |
| download | emacs-e516799970be4553edae8ca46d5f64852befec77.tar.gz emacs-e516799970be4553edae8ca46d5f64852befec77.zip | |
*** empty log message ***
Diffstat (limited to 'lisp/textmodes')
| -rw-r--r-- | lisp/textmodes/bib-mode.el | 7 | ||||
| -rw-r--r-- | lisp/textmodes/bibtex.el | 580 | ||||
| -rw-r--r-- | lisp/textmodes/fill.el | 6 | ||||
| -rw-r--r-- | lisp/textmodes/nroff-mode.el | 4 | ||||
| -rw-r--r-- | lisp/textmodes/ooutline.el | 7 | ||||
| -rw-r--r-- | lisp/textmodes/page-ext.el | 17 | ||||
| -rw-r--r-- | lisp/textmodes/page.el | 6 | ||||
| -rw-r--r-- | lisp/textmodes/picture.el | 8 | ||||
| -rw-r--r-- | lisp/textmodes/refbib.el | 12 | ||||
| -rw-r--r-- | lisp/textmodes/spell.el | 4 | ||||
| -rw-r--r-- | lisp/textmodes/tex-mode.el | 10 | ||||
| -rw-r--r-- | lisp/textmodes/texinfmt.el | 10 | ||||
| -rw-r--r-- | lisp/textmodes/texinfo.el | 8 | ||||
| -rw-r--r-- | lisp/textmodes/underline.el | 6 |
14 files changed, 448 insertions, 237 deletions
diff --git a/lisp/textmodes/bib-mode.el b/lisp/textmodes/bib-mode.el index 8c7c38c4c31..22110bb4afd 100644 --- a/lisp/textmodes/bib-mode.el +++ b/lisp/textmodes/bib-mode.el | |||
| @@ -1,12 +1,16 @@ | |||
| 1 | ;;; bib-mode.el --- bib-mode, major mode for editing bib files. | 1 | ;;; bib-mode.el --- bib-mode, major mode for editing bib files. |
| 2 | 2 | ||
| 3 | ;; Maintainer: FSF | ||
| 4 | ;; Last-Modified: 16 Mar 1992 | ||
| 5 | ;; Keywords: bib | ||
| 6 | |||
| 3 | ;; Copyright (C) 1989 Free Software Foundation, Inc. | 7 | ;; Copyright (C) 1989 Free Software Foundation, Inc. |
| 4 | 8 | ||
| 5 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 6 | 10 | ||
| 7 | ;; GNU Emacs is free software; you can redistribute it and/or modify | 11 | ;; GNU Emacs is free software; you can redistribute it and/or modify |
| 8 | ;; it under the terms of the GNU General Public License as published by | 12 | ;; it under the terms of the GNU General Public License as published by |
| 9 | ;; the Free Software Foundation; either version 1, or (at your option) | 13 | ;; the Free Software Foundation; either version 2, or (at your option) |
| 10 | ;; any later version. | 14 | ;; any later version. |
| 11 | 15 | ||
| 12 | ;; GNU Emacs is distributed in the hope that it will be useful, | 16 | ;; GNU Emacs is distributed in the hope that it will be useful, |
| @@ -18,6 +22,7 @@ | |||
| 18 | ;; along with GNU Emacs; see the file COPYING. If not, write to | 22 | ;; along with GNU Emacs; see the file COPYING. If not, write to |
| 19 | ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | 23 | ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
| 20 | 24 | ||
| 25 | ;;; Code: | ||
| 21 | 26 | ||
| 22 | ;; Bib-Mode | 27 | ;; Bib-Mode |
| 23 | ;; GNU Emacs code to help maintain databases compatible with (troff) | 28 | ;; GNU Emacs code to help maintain databases compatible with (troff) |
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 4579760d9bb..083bb6befb9 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el | |||
| @@ -1,12 +1,12 @@ | |||
| 1 | ;;; bibtex.el --- BibTeX mode for GNU Emacs | 1 | ;;; bibtex.el --- BibTeX mode for GNU Emacs |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985, 1986, 1987, 1990 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1992 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; This file is part of GNU Emacs. | 5 | ;; This file is part of GNU Emacs. |
| 6 | 6 | ||
| 7 | ;; GNU Emacs is free software; you can redistribute it and/or modify | 7 | ;; GNU Emacs is free software; you can redistribute it and/or modify |
| 8 | ;; it under the terms of the GNU General Public License as published by | 8 | ;; it under the terms of the GNU General Public License as published by |
| 9 | ;; the Free Software Foundation; either version 1, or (at your option) | 9 | ;; the Free Software Foundation; either version 2, or (at your option) |
| 10 | ;; any later version. | 10 | ;; any later version. |
| 11 | 11 | ||
| 12 | ;; GNU Emacs is distributed in the hope that it will be useful, | 12 | ;; GNU Emacs is distributed in the hope that it will be useful, |
| @@ -18,40 +18,24 @@ | |||
| 18 | ;; along with GNU Emacs; see the file COPYING. If not, write to | 18 | ;; along with GNU Emacs; see the file COPYING. If not, write to |
| 19 | ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | 19 | ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
| 20 | 20 | ||
| 21 | ;;; Mike Newton (newton@gumby.cs.caltech.edu) 92.2.11 | 21 | ;;; (current keeper: shapiro@corto.inria.fr) |
| 22 | ;;; * Fixed bibtex-field string to allow things like: | 22 | |
| 23 | ;;; author = "{S}schr\"odinger" or | 23 | ;;; alarson@src.honeywell.com 92-Jan-31 |
| 24 | ;;; author = "{S}schr\"{o}dinger" or | 24 | ;;; Added support for: ispell, beginning/end of entry movement, a simple |
| 25 | ;;; author = "{S}schr{\"o}dinger" or | 25 | ;;; outline like mode (hide the bodies of bibtex entries), support for |
| 26 | ;;; NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE | 26 | ;;; sorting bibtex entries, and maintaining them in sorted order, and |
| 27 | ;;; NOTE: This is the last update I plan to do. | 27 | ;;; simple buffer validation. |
| 28 | ;;; NOTE: the previous version was submitted and, according to RMS, | 28 | ;;; User visible functions added: |
| 29 | ;;; accepted as the release version for ver 19. | 29 | ;;; ispell-{abstract,bibtex-entry}, {beginning,end}-of-bibtex-entry |
| 30 | ;;; NOTE: PLEASE DO NOT SEND ME ANY MORE 'PLEASE ADD THIS' MESSAGES. | 30 | ;;; hide-bibtex-entry-bodies, sort-bibtex-entries, validate-bibtex- |
| 31 | ;;; NOTE: I am no longer taking care of this package. | 31 | ;;; buffer, find-bibtex-duplicates |
| 32 | ;;; NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE | 32 | ;;; user visible variables added: |
| 33 | 33 | ;;; bibtex-maintain-sorted-entries | |
| 34 | ;;; Mike Newton (newton@gumby.cs.caltech.edu) 91.1.24 | 34 | ;;; new local keybindings: |
| 35 | ;;; * bibtex-make-optional-field : modified to make fields align up after | 35 | ;;; " TeX-insert-quote |
| 36 | ;;; the OPT's have been removed. | 36 | ;;; C-c$ ispell-bibtex-entry |
| 37 | ;;; * bibtex-make-optional-field : modified to check bibtex-use-OPT-prefix | 37 | ;;; M-C-a beginning-of-bibtex-entry |
| 38 | ;;; * bibtex-make*field : modified to call new procedure: | 38 | ;;; M-C-e end-of-bibtex-entry |
| 39 | ;;; * bibtex-insert-field-delimeters : which does delimeter insertion based on | ||
| 40 | ;;; * bibtex-curly-delimeters : a list of atoms | ||
| 41 | ;;; * fixed spelling of bibtex-name-alignment wherever used | ||
| 42 | ;;; * bibtex-inside-field : allows '}'s at end | ||
| 43 | ;;; * bibtex-find-text : allows '{' and '}'s at start or end | ||
| 44 | ;;; * bibtex-enclosing-regexp fixed for case where start-point was at end of | ||
| 45 | ;;; pattern. | ||
| 46 | ;;; * bibtex-clean-entry : allow bibtex-save-OPT to save some optional fields | ||
| 47 | ;;; * bibtex-move-outside-of-entry : could overwrite first line of a following | ||
| 48 | ;;; comment or other text if it did not look like a bibtex entry | ||
| 49 | |||
| 50 | ;;; Mike Newton (newton@gumby.cs.caltech.edu) 91.1.20 | ||
| 51 | ;;; * bibtex.el/bibtex-mode : updated comments to indicate new use of | ||
| 52 | ;;; address, add minor explanations and fix small omissions. | ||
| 53 | ;;; * bibtex.el/bibtex-entry : fixed spelling of variable | ||
| 54 | |||
| 55 | ;;; Mike Newton (newton@gumby.cs.caltech.edu) 90.11.17 | 39 | ;;; Mike Newton (newton@gumby.cs.caltech.edu) 90.11.17 |
| 56 | ;;; * Handle items like | 40 | ;;; * Handle items like |
| 57 | ;;; title = poft # "Fifth Tri-quaterly" # random-conf, | 41 | ;;; title = poft # "Fifth Tri-quaterly" # random-conf, |
| @@ -60,17 +44,11 @@ | |||
| 60 | ;;; * fixed 'bibtex-find-it's doc string's location | 44 | ;;; * fixed 'bibtex-find-it's doc string's location |
| 61 | ;;; * bibtex-field-text made more general (it wouldnt handle the # construct) | 45 | ;;; * bibtex-field-text made more general (it wouldnt handle the # construct) |
| 62 | ;;; and it now handles a small subset of the {} cases | 46 | ;;; and it now handles a small subset of the {} cases |
| 63 | ;;; * put DEA thesis back in (why get rid of good code?) | ||
| 64 | ;;; * merged into release 19 version code | ||
| 65 | ;;; * if cross-ref'ing is on, put 'pages' near top of OPTs, as the other | ||
| 66 | ;;; entries are unlikely to be used. | ||
| 67 | ;;; * skip-whitespace replaced by skip-chars-forward (also done | ||
| 68 | ;;; by Marc Shairo) | ||
| 69 | 47 | ||
| 70 | ;;; Bengt Martensson, March 6 | 48 | ;;; Bengt Martensson, March 6 |
| 71 | ;;; Adapted to Bibtex 0.99 by updating the optional fields according | 49 | ;;; Adapted to Bibtex 0.99 by updating the optional fields according |
| 72 | ;;; to the document BibTeXing, Oren Patashnik, dated January 31, 1988. | 50 | ;;; to the document BibTeXing, Oren Patashnik, dated January 31, 1988. |
| 73 | ;;; Updated documentation strings accordingly. Added . | 51 | ;;; Updated documentation strings accordingly. Added (provide 'bibtex). |
| 74 | ;;; If bibtex-include-OPT-crossref is non-nil, every entry will have | 52 | ;;; If bibtex-include-OPT-crossref is non-nil, every entry will have |
| 75 | ;;; an OPTcrossref field, analogously for bibtex-include-OPTkey and | 53 | ;;; an OPTcrossref field, analogously for bibtex-include-OPTkey and |
| 76 | ;;; bibtex-include-OPTannote. Added bibtex-preamble, bound to ^C^EP, | 54 | ;;; bibtex-include-OPTannote. Added bibtex-preamble, bound to ^C^EP, |
| @@ -80,13 +58,14 @@ | |||
| 80 | ;;; correctly, BibTeX 0.99 broke it.) | 58 | ;;; correctly, BibTeX 0.99 broke it.) |
| 81 | ;;; Added bibtex-clean-entry-zap-empty-opts, defvar'd to t. If it | 59 | ;;; Added bibtex-clean-entry-zap-empty-opts, defvar'd to t. If it |
| 82 | ;;; is nil, bibtex-clean-entry will leave empty optional fields alone. | 60 | ;;; is nil, bibtex-clean-entry will leave empty optional fields alone. |
| 83 | 61 | ||
| 84 | ;;; Marc Shapiro 1-feb-89: integrated changes by Bengt Martensson 88-05-06: | 62 | ;;; Marc Shapiro 1-feb-89: integrated changes by Bengt Martensson 88-05-06: |
| 85 | ;;; Added Sun menu support. Locally bound to right mouse button in | 63 | ;;; Added Sun menu support. Locally bound to right mouse button in |
| 86 | ;;; bibtex-mode. Emacs 18.49 allows local mouse bindings!! | 64 | ;;; bibtex-mode. Emacs 18.49 allows local mouse bindings!! |
| 87 | ;;; Commented out DEAthesis. | 65 | ;;; Commented out DEAthesis. |
| 88 | 66 | ||
| 89 | ;;; Marc Shapiro 6-oct-88 | 67 | ;;; Marc Shapiro 6-oct-88 |
| 68 | ;;; * skip-whitespace replaced by skip-chars-forward | ||
| 90 | ;;; * use indent-to-column instead of inserting tabs (changes to | 69 | ;;; * use indent-to-column instead of inserting tabs (changes to |
| 91 | ;;; bibtex-entry, bibtex-make-entry, bibtex-make-OPT-entry, renamed to | 70 | ;;; bibtex-entry, bibtex-make-entry, bibtex-make-OPT-entry, renamed to |
| 92 | ;;; bibtex-make-optional-entry) | 71 | ;;; bibtex-make-optional-entry) |
| @@ -100,6 +79,7 @@ | |||
| 100 | ;;; * bibtex-clean-entry signals mandatory fields left empty. | 79 | ;;; * bibtex-clean-entry signals mandatory fields left empty. |
| 101 | 80 | ||
| 102 | ;;; Marc Shapiro 18-jul-88 | 81 | ;;; Marc Shapiro 18-jul-88 |
| 82 | ;;; * Fixed bug in bibtex-flash-entry | ||
| 103 | ;;; * Moved all the entry type keystrokes to "C-c C-e something" (instead of | 83 | ;;; * Moved all the entry type keystrokes to "C-c C-e something" (instead of |
| 104 | ;;; "C-c something" previously) to make room for more. C-c C-e is | 84 | ;;; "C-c something" previously) to make room for more. C-c C-e is |
| 105 | ;;; supposed to stand for "entry" [idea taken from mail-mode]. Moved | 85 | ;;; supposed to stand for "entry" [idea taken from mail-mode]. Moved |
| @@ -132,7 +112,7 @@ | |||
| 132 | ;;; run-hooks | 112 | ;;; run-hooks |
| 133 | 113 | ||
| 134 | ;;; Bengt Martensson <ubrinf!mond!bengt> 87-06-28 | 114 | ;;; Bengt Martensson <ubrinf!mond!bengt> 87-06-28 |
| 135 | ;;; (Bengt Martensson <bengt@mathematik.uni-Bremen.de> 87-06-28) | 115 | ;;; Bengt Martensson <bengt@mathematik.uni-Bremen.de> 87-06-28 |
| 136 | ;;; Original version | 116 | ;;; Original version |
| 137 | 117 | ||
| 138 | ;;; NOTE by Marc Shapiro, 14-dec-87: | 118 | ;;; NOTE by Marc Shapiro, 14-dec-87: |
| @@ -140,37 +120,42 @@ | |||
| 140 | ;;; Trouble is, in Emacs 18.44 you can't have a mode-specific mouse binding, | 120 | ;;; Trouble is, in Emacs 18.44 you can't have a mode-specific mouse binding, |
| 141 | ;;; so it will remain active in all windows. Yuck! | 121 | ;;; so it will remain active in all windows. Yuck! |
| 142 | 122 | ||
| 123 | (provide 'bibtex) | ||
| 124 | |||
| 125 | ;;; these guys typically don't have autoloads...[alarson:19920131.1548CST] | ||
| 126 | (if (not (fboundp 'TeX-insert-quote)) | ||
| 127 | (autoload 'TeX-insert-quote "tex-mode")) | ||
| 128 | (if (not (fboundp 'sort-subr)) | ||
| 129 | (autoload 'sort-subr "sort")) | ||
| 130 | |||
| 131 | |||
| 132 | |||
| 143 | (defvar bibtex-mode-syntax-table nil "") | 133 | (defvar bibtex-mode-syntax-table nil "") |
| 144 | (defvar bibtex-mode-abbrev-table nil "") | 134 | (defvar bibtex-mode-abbrev-table nil "") |
| 145 | (define-abbrev-table 'bibtex-mode-abbrev-table ()) | 135 | (define-abbrev-table 'bibtex-mode-abbrev-table ()) |
| 146 | (defvar bibtex-mode-map (make-sparse-keymap) "") | 136 | (defvar bibtex-mode-map (make-sparse-keymap) "") |
| 137 | |||
| 147 | (defvar bibtex-pop-previous-search-point nil | 138 | (defvar bibtex-pop-previous-search-point nil |
| 148 | "Next point where bibtex-pop-previous should start looking for a similar | 139 | "Next point where bibtex-pop-previous should start looking for a similar |
| 149 | entry.") | 140 | entry.") |
| 141 | |||
| 150 | (defvar bibtex-pop-next-search-point nil | 142 | (defvar bibtex-pop-next-search-point nil |
| 151 | "Next point where bibtex-pop-next should start looking for a similar | 143 | "Next point where bibtex-pop-next should start looking for a similar |
| 152 | entry.") | 144 | entry.") |
| 153 | 145 | ||
| 154 | (defvar bibtex-clean-entry-zap-empty-opts t | 146 | (defvar bibtex-clean-entry-zap-empty-opts t |
| 155 | "*If non-nil, bibtex-clean-entry will delete all empty optional fields.") | 147 | "*If non-nil, bibtex-clean-entry will delete all empty optional fields.") |
| 148 | |||
| 156 | (defvar bibtex-include-OPTcrossref t | 149 | (defvar bibtex-include-OPTcrossref t |
| 157 | "*If non-nil, all entries will have an OPTcrossref field.") | 150 | "*If non-nil, all entries will have an OPTcrossref field.") |
| 158 | (defvar bibtex-include-OPTkey t | 151 | (defvar bibtex-include-OPTkey t |
| 159 | "*If non-nil, all entries will have an OPTkey field.") | 152 | "*If non-nil, all entries will have an OPTkey field.") |
| 160 | (defvar bibtex-include-OPTannote t | 153 | (defvar bibtex-include-OPTannote t |
| 161 | "*If non-nil, all entries will have an OPTannote field.") | 154 | "*If non-nil, all entries will have an OPTannote field.") |
| 162 | (defvar bibtex-use-OPT-prefix t | ||
| 163 | "*If non-nil, put OPT string before optionals. Usually desired!") | ||
| 164 | (defvar bibtex-save-OPT nil | ||
| 165 | "*List of atoms (representing strings) which are optional fields that | ||
| 166 | should not be deleted if null.") | ||
| 167 | (defvar bibtex-curly-delimeters nil | ||
| 168 | "List of atoms representing strings (in any case) that should have curly | ||
| 169 | braces used as their delimeters instead of double quotes.") | ||
| 170 | |||
| 171 | 155 | ||
| 172 | ;; note: the user should be allowed to have their own list of always | 156 | ;; note: the user should be allowed to have their own list of always |
| 173 | ;; available optional fields. exs: "keywords" "categories" | 157 | ;; available optional fields. exs: "keywords" "categories" |
| 158 | |||
| 174 | (defvar bibtex-mode-user-optional-fields nil ;no default value | 159 | (defvar bibtex-mode-user-optional-fields nil ;no default value |
| 175 | "*List of optional fields that user want to have as always present | 160 | "*List of optional fields that user want to have as always present |
| 176 | when making a bibtex entry. One possibility is for ``keywords''") | 161 | when making a bibtex entry. One possibility is for ``keywords''") |
| @@ -208,40 +193,32 @@ when making a bibtex entry. One possibility is for ``keywords''") | |||
| 208 | ;; key = {Volume-2}, | 193 | ;; key = {Volume-2}, |
| 209 | ;; note = "Volume~2 is listed under Knuth \cite{book-full}" | 194 | ;; note = "Volume~2 is listed under Knuth \cite{book-full}" |
| 210 | ;; i have added a few of these, but not all! -- MON | 195 | ;; i have added a few of these, but not all! -- MON |
| 211 | ;; 92.2.11: also must handle: | ||
| 212 | ;; author = "{S}schr\"odinger" or | ||
| 213 | ;; author = "{S}schr\"{o}dinger" or | ||
| 214 | ;; author = "{S}schr{\"o}dinger" or | ||
| 215 | |||
| 216 | 196 | ||
| 217 | (defconst bibtex-field-const | 197 | (defconst bibtex-field-const |
| 218 | "[0-9A-Za-z][---A-Za-z0-9:_+]*" | 198 | "[0-9A-Za-z][---A-Za-z0-9:_+]*" |
| 219 | "Format of a bibtex field constant.") | 199 | "Format of a bibtex field constant.") |
| 220 | 200 | ||
| 221 | (defconst bibtex-field-string ;;was:(concat "\"[^\"]*[^\\\\]\"\\|\"\"") | 201 | (defconst bibtex-field-string |
| 222 | (concat | 202 | (concat |
| 223 | "\"\\([^\"]*[\\\\][\"]\\)*[^\"]*[^\\\\]\"" | 203 | "\"[^\"]*[^\\\\]\"\\|\"\"") |
| 224 | "\\|" ;ie: OR | 204 | "Match either a string or an empty string.") |
| 225 | "\"\"" | 205 | |
| 226 | "\\|" ;ie: OR | ||
| 227 | "\"[^\"]*[^\\\\]\"") | ||
| 228 | "Match either a \"-d string or an empty string or a plain string.") | ||
| 229 | (defconst bibtex-field-string-or-const | 206 | (defconst bibtex-field-string-or-const |
| 230 | (concat bibtex-field-const "\\|" bibtex-field-string) | 207 | (concat bibtex-field-const "\\|" bibtex-field-string) |
| 231 | "Match either bibtex-field-string or bibtex-field-const.") | 208 | "Match either bibtex-field-string or bibtex-field-const.") |
| 232 | 209 | ||
| 233 | ;(defconst bibtex-field-text | ||
| 234 | ; "\"[^\"]*[^\\\\]\"\\|\"\"\\|[0-9A-Za-z][---A-Za-z0-9:_+]*" | ||
| 235 | ; "Regexp defining the text part of a bibtex field: either a string, or an empty string, or a constant.") | ||
| 236 | |||
| 237 | (defconst bibtex-field-text | 210 | (defconst bibtex-field-text |
| 238 | (concat | 211 | (concat |
| 239 | "\\(" bibtex-field-string-or-const "\\)" | 212 | "\\(" bibtex-field-string-or-const "\\)" |
| 240 | "\\([ \t\n]+#[ \t\n]+\\(" bibtex-field-string-or-const "\\)\\)*\\|" | 213 | "\\([ \t\n]+#[ \t\n]+\\(" bibtex-field-string-or-const "\\)\\)*\\|" |
| 241 | "{[^{}]*[^\\\\]}" "\\|" "{}") | 214 | "{[^{}]*[^\\\\]}") |
| 242 | "Regexp defining the text part of a bibtex field: either a string, or | 215 | "Regexp defining the text part of a bibtex field: either a string, or |
| 243 | an empty string, or a constant followed by one or more # / constant pairs. | 216 | an empty string, or a constant followed by one or more # / constant pairs. |
| 244 | Also matches simple {...} patterns, including the special case {}.") | 217 | Also matches simple {...} patterns.") |
| 218 | |||
| 219 | ;(defconst bibtex-field-text | ||
| 220 | ; "\"[^\"]*[^\\\\]\"\\|\"\"\\|[0-9A-Za-z][---A-Za-z0-9:_+]*" | ||
| 221 | ; "Regexp defining the text part of a bibtex field: either a string, or an empty string, or a constant.") | ||
| 245 | 222 | ||
| 246 | (defconst bibtex-field | 223 | (defconst bibtex-field |
| 247 | (bibtex-cfield bibtex-field-name bibtex-field-text) | 224 | (bibtex-cfield bibtex-field-name bibtex-field-text) |
| @@ -256,7 +233,6 @@ Also matches simple {...} patterns, including the special case {}.") | |||
| 256 | (defconst bibtex-reference-type | 233 | (defconst bibtex-reference-type |
| 257 | "@[A-Za-z]+" | 234 | "@[A-Za-z]+" |
| 258 | "Regexp defining the type part of a bibtex reference entry") | 235 | "Regexp defining the type part of a bibtex reference entry") |
| 259 | |||
| 260 | (defconst bibtex-reference-head | 236 | (defconst bibtex-reference-head |
| 261 | (concat "^[ \t]*\\(" | 237 | (concat "^[ \t]*\\(" |
| 262 | bibtex-reference-type | 238 | bibtex-reference-type |
| @@ -281,7 +257,7 @@ bibtex-reference-head") | |||
| 281 | "The regexp subexpression number of the key part in | 257 | "The regexp subexpression number of the key part in |
| 282 | bibtex-reference") | 258 | bibtex-reference") |
| 283 | 259 | ||
| 284 | ;;; string definitions. note bibtex-string is a constant and a defun ! | 260 | ;;; strings |
| 285 | (defconst bibtex-string | 261 | (defconst bibtex-string |
| 286 | (concat "^[ \t]*@[sS][tT][rR][iI][nN][gG][ \t\n]*[({][ \t\n]*\\(" | 262 | (concat "^[ \t]*@[sS][tT][rR][iI][nN][gG][ \t\n]*[({][ \t\n]*\\(" |
| 287 | bibtex-field-name | 263 | bibtex-field-name |
| @@ -289,13 +265,12 @@ bibtex-reference") | |||
| 289 | bibtex-field-text | 265 | bibtex-field-text |
| 290 | "\\)[ \t\n]*[})]") | 266 | "\\)[ \t\n]*[})]") |
| 291 | "Regexp defining the format of a bibtex string entry") | 267 | "Regexp defining the format of a bibtex string entry") |
| 292 | |||
| 293 | (defconst bibtex-name-in-string 1 | 268 | (defconst bibtex-name-in-string 1 |
| 294 | "The regexp subexpression of the name part in bibtex-string") | 269 | "The regexp subexpression of the name part in bibtex-string") |
| 295 | (defconst bibtex-text-in-string 2 | 270 | (defconst bibtex-text-in-string 2 |
| 296 | "The regexp subexpression of the text part in bibtex-string") | 271 | "The regexp subexpression of the text part in bibtex-string") |
| 297 | 272 | ||
| 298 | (defconst bibtex-name-alignment 2 | 273 | (defconst bibtex-name-alignement 2 |
| 299 | "Alignment for the name part in BibTeX fields. | 274 | "Alignment for the name part in BibTeX fields. |
| 300 | Chosen on aesthetic grounds only.") | 275 | Chosen on aesthetic grounds only.") |
| 301 | 276 | ||
| @@ -334,7 +309,7 @@ mouse button. | |||
| 334 | 309 | ||
| 335 | Fields: | 310 | Fields: |
| 336 | address | 311 | address |
| 337 | Publisher's address, or for conference, location held | 312 | Publisher's address |
| 338 | annote | 313 | annote |
| 339 | Long annotation used for annotated bibliographies (begins sentence) | 314 | Long annotation used for annotated bibliographies (begins sentence) |
| 340 | author | 315 | author |
| @@ -343,11 +318,11 @@ Fields: | |||
| 343 | Book title when the thing being referenced isn't the whole book. | 318 | Book title when the thing being referenced isn't the whole book. |
| 344 | For book entries, the title field should be used instead. | 319 | For book entries, the title field should be used instead. |
| 345 | chapter | 320 | chapter |
| 346 | Chapter number (or section or whatever). | 321 | Chapter number |
| 347 | crossref | 322 | crossref |
| 348 | The database key of the entry being cross referenced. | 323 | The database key of the entry being cross referenced. |
| 349 | edition | 324 | edition |
| 350 | Edition of a book (e.g., \"second\") | 325 | Edition of a book (e.g., ""second"") |
| 351 | editor | 326 | editor |
| 352 | Name(s) of editor(s), in BibTeX name format. | 327 | Name(s) of editor(s), in BibTeX name format. |
| 353 | If there is also an author field, then the editor field should be | 328 | If there is also an author field, then the editor field should be |
| @@ -359,8 +334,7 @@ Fields: | |||
| 359 | journal | 334 | journal |
| 360 | Journal name (macros are provided for many) | 335 | Journal name (macros are provided for many) |
| 361 | key | 336 | key |
| 362 | Alphabetizing, labeling and cross-refing key (needed when no | 337 | Alphabetizing and labeling key (needed when no author or editor) |
| 363 | author or editor) | ||
| 364 | month | 338 | month |
| 365 | Month (macros are provided) | 339 | Month (macros are provided) |
| 366 | note | 340 | note |
| @@ -381,8 +355,8 @@ Fields: | |||
| 381 | title | 355 | title |
| 382 | The title of the thing being referenced | 356 | The title of the thing being referenced |
| 383 | type | 357 | type |
| 384 | Type of a technical report (e.g., \"Research Note\") to be used | 358 | Type of a technical report (e.g., ""Research Note"") to be used |
| 385 | instead of the default \"Technical Report\" | 359 | instead of the default ""Technical Report"" |
| 386 | volume | 360 | volume |
| 387 | Volume of a journal or multivolume work | 361 | Volume of a journal or multivolume work |
| 388 | year | 362 | year |
| @@ -425,6 +399,12 @@ non-nil." | |||
| 425 | (define-key bibtex-mode-map "\C-c\C-k" 'bibtex-kill-optional-field) | 399 | (define-key bibtex-mode-map "\C-c\C-k" 'bibtex-kill-optional-field) |
| 426 | (define-key bibtex-mode-map "\C-c\C-d" 'bibtex-empty-field) | 400 | (define-key bibtex-mode-map "\C-c\C-d" 'bibtex-empty-field) |
| 427 | 401 | ||
| 402 | ;; [alarson:19920131.1543CST] | ||
| 403 | (define-key bibtex-mode-map "\"" 'TeX-insert-quote) | ||
| 404 | (define-key bibtex-mode-map "\C-c$" 'ispell-bibtex-entry) | ||
| 405 | (define-key bibtex-mode-map "\M-\C-a" 'beginning-of-bibtex-entry) | ||
| 406 | (define-key bibtex-mode-map "\M-\C-e" 'end-of-bibtex-entry) | ||
| 407 | |||
| 428 | (define-key bibtex-mode-map "\C-c\C-e\C-a" 'bibtex-Article) | 408 | (define-key bibtex-mode-map "\C-c\C-e\C-a" 'bibtex-Article) |
| 429 | (define-key bibtex-mode-map "\C-c\C-e\C-b" 'bibtex-Book) | 409 | (define-key bibtex-mode-map "\C-c\C-e\C-b" 'bibtex-Book) |
| 430 | (define-key bibtex-mode-map "\C-c\C-e\C-d" 'bibtex-DEAthesis) | 410 | (define-key bibtex-mode-map "\C-c\C-e\C-d" 'bibtex-DEAthesis) |
| @@ -459,9 +439,182 @@ non-nil." | |||
| 459 | (t | 439 | (t |
| 460 | (backward-paragraph) | 440 | (backward-paragraph) |
| 461 | (forward-paragraph))) | 441 | (forward-paragraph))) |
| 462 | (re-search-forward "[ \t\n]*" (point-max) t) | 442 | (re-search-forward "[ \t\n]*" (point-max) t)) |
| 463 | (insert "\n") | 443 | |
| 464 | (forward-char -1)) | 444 | (defun ispell-abstract () |
| 445 | (interactive) | ||
| 446 | (beginning-of-bibtex-entry) | ||
| 447 | (re-search-forward "^[ \t]*[OPT]*abstract[ \t]*=") | ||
| 448 | (ispell-region (point) | ||
| 449 | (save-excursion (forward-sexp) (point)))) | ||
| 450 | |||
| 451 | (defun beginning-of-bibtex-entry () | ||
| 452 | (interactive) | ||
| 453 | (re-search-backward "^@" nil 'move)) | ||
| 454 | |||
| 455 | (defun end-of-bibtex-entry () | ||
| 456 | (interactive) | ||
| 457 | (re-search-forward "}$" nil 'move)) | ||
| 458 | |||
| 459 | (defun ispell-bibtex-entry () | ||
| 460 | (interactive) | ||
| 461 | (ispell-region (progn (beginning-of-bibtex-entry) (point)) | ||
| 462 | (progn (end-of-bibtex-entry) (point)))) | ||
| 463 | |||
| 464 | (defun narrow-to-bibtex-entry () | ||
| 465 | (interactive) | ||
| 466 | (save-excursion | ||
| 467 | (narrow-to-region (progn (beginning-of-bibtex-entry) (point)) | ||
| 468 | (progn (end-of-bibtex-entry) (point))))) | ||
| 469 | |||
| 470 | |||
| 471 | (defun beginning-of-first-bibtex-entry () | ||
| 472 | (goto-char (point-min)) | ||
| 473 | (cond | ||
| 474 | ((re-search-forward "^@" nil 'move) | ||
| 475 | (beginning-of-line)) | ||
| 476 | ((and (bobp) (eobp)) | ||
| 477 | nil) | ||
| 478 | (t | ||
| 479 | (message "Warning: No bibtex entries found!")))) | ||
| 480 | |||
| 481 | (defun hide-bibtex-entry-bodies (&optional arg) | ||
| 482 | "Hide all lines between first and last bibtex entries not beginning with @. | ||
| 483 | With argument, show all text." | ||
| 484 | (interactive "P") | ||
| 485 | (beginning-of-first-bibtex-entry) | ||
| 486 | ;; subst-char-in-region modifies the buffer, despite what the | ||
| 487 | ;; documentation says... | ||
| 488 | (let ((modifiedp (buffer-modified-p)) | ||
| 489 | (buffer-read-only nil)) | ||
| 490 | (if arg | ||
| 491 | (subst-char-in-region (point) (point-max) ?\r ?\n t) | ||
| 492 | (while (save-excursion (re-search-forward "\n[^@]" (point-max) t)) | ||
| 493 | (save-excursion (replace-regexp "\n\\([^@]\\)" "\r\\1")))) | ||
| 494 | (setq selective-display (not arg)) | ||
| 495 | (set-buffer-modified-p modifiedp))) | ||
| 496 | |||
| 497 | (defun sort-bibtex-entries () | ||
| 498 | "Sort bibtex entries alphabetically by key. | ||
| 499 | Text before the first bibtex entry, and following the last is not effected. | ||
| 500 | Bugs: | ||
| 501 | 1. Text between the closing brace ending one bibtex entry, and the @ starting | ||
| 502 | the next, is considered part of the PRECEEDING entry. Perhaps it should be | ||
| 503 | part of the following entry." | ||
| 504 | (interactive) | ||
| 505 | (save-restriction | ||
| 506 | (beginning-of-first-bibtex-entry) | ||
| 507 | (narrow-to-region (point) | ||
| 508 | (save-excursion | ||
| 509 | (goto-char (point-max)) | ||
| 510 | (beginning-of-bibtex-entry) | ||
| 511 | (end-of-bibtex-entry) | ||
| 512 | (point))) | ||
| 513 | (sort-subr nil ; reversep | ||
| 514 | ;; begining of record function | ||
| 515 | 'forward-line | ||
| 516 | ;; end of record function | ||
| 517 | (function (lambda () (and (re-search-forward "}[ \t]*\n[\n \t]*@" nil 'move) | ||
| 518 | (forward-char -2)))) | ||
| 519 | ;; start of key function | ||
| 520 | (function (lambda () (re-search-forward "{[ \t]*") nil)) | ||
| 521 | ;; end of key function | ||
| 522 | (function (lambda () (search-forward ","))) | ||
| 523 | ))) | ||
| 524 | |||
| 525 | (defun map-bibtex-entries (fun) | ||
| 526 | "Call FUN for each bibtex entry starting with the current, to the end of the file. | ||
| 527 | FUN is called with one argument, the key of the entry, and with point inside the entry." | ||
| 528 | (beginning-of-bibtex-entry) | ||
| 529 | (while (re-search-forward "^@[^{]*{[ \t]*\\([^,]*\\)" nil t) | ||
| 530 | (funcall fun (buffer-substring (match-beginning 1) (match-end 1))))) | ||
| 531 | |||
| 532 | (defun find-bibtex-entry-location (entry-name) | ||
| 533 | (interactive "sBibtex entry key: ") | ||
| 534 | "Searches from beginning of current buffer looking for place to put the | ||
| 535 | bibtex entry named ENTRY-NAME. Buffer is assumed to be in sorted order, | ||
| 536 | without duplicates (see \\[sort-bibtex-entries]), if it is not, an error will | ||
| 537 | be signalled." | ||
| 538 | (let ((previous nil) | ||
| 539 | point) | ||
| 540 | (beginning-of-first-bibtex-entry) | ||
| 541 | (or (catch 'done | ||
| 542 | (map-bibtex-entries (function (lambda (current) | ||
| 543 | (cond | ||
| 544 | ((string-equal entry-name current) | ||
| 545 | (error "Entry duplicates existing!")) | ||
| 546 | ((or (null previous) | ||
| 547 | (string< previous current)) | ||
| 548 | (setq previous current | ||
| 549 | point (point)) | ||
| 550 | (if (string< entry-name current) | ||
| 551 | (progn | ||
| 552 | (beginning-of-bibtex-entry) | ||
| 553 | ;; Many schemes append strings to | ||
| 554 | ;; existing entries to resolve them, | ||
| 555 | ;; so initial substring matches may | ||
| 556 | ;; indicate a duplicate entry. | ||
| 557 | (let ((idx (string-match (regexp-quote entry-name) current))) | ||
| 558 | (if (and (integerp idx) | ||
| 559 | (zerop idx)) | ||
| 560 | (progn | ||
| 561 | (message "Warning: Entry %s may be a duplicate of %s!" | ||
| 562 | entry-name current) | ||
| 563 | (ding t)))) | ||
| 564 | (throw 'done t)))) | ||
| 565 | ((string-equal previous current) | ||
| 566 | (error "Duplicate here with previous!")) | ||
| 567 | (t (error "Entries out of order here!"))))))) | ||
| 568 | (end-of-bibtex-entry)))) | ||
| 569 | |||
| 570 | (defun validate-bibtex-buffer () | ||
| 571 | "Find some typical errors in bibtex files. | ||
| 572 | 1. At signs (@) not as first char of a line. | ||
| 573 | 2. Double quotes (\") inside strings. | ||
| 574 | 3. Closing braces (}) not the last character of a line." | ||
| 575 | (interactive) | ||
| 576 | (let ((point (point))) | ||
| 577 | (while (re-search-forward ".@" nil t) | ||
| 578 | (let* ((foo (parse-partial-sexp (save-excursion (beginning-of-bibtex-entry) | ||
| 579 | (point)) | ||
| 580 | (point))) | ||
| 581 | (in-a-string (nth 3 foo))) | ||
| 582 | (if (not in-a-string) | ||
| 583 | (error "At sign (@) out of place!")))) | ||
| 584 | (goto-char point) | ||
| 585 | (while (search-forward "\"" nil t) | ||
| 586 | (or (looking-at "[,}][ \t]*$") | ||
| 587 | ;; some versions put closing brace on separate line. | ||
| 588 | (looking-at "[ \t]*\n}") | ||
| 589 | (save-excursion | ||
| 590 | (save-restriction | ||
| 591 | (narrow-to-region (point) | ||
| 592 | (progn (beginning-of-line) (point))) | ||
| 593 | (looking-at "^[ \t]*[a-zA-Z]+[ \t]*=[ \t]*\"$"))) | ||
| 594 | (error "Quote out of place, or missing \",\" or \"}\"!"))) | ||
| 595 | (goto-char point) | ||
| 596 | ;; This is only approximate, should actually search for close braces, | ||
| 597 | ;; then see if they are inside a string, or at the end of a line. | ||
| 598 | ;; This just gets the typical case of whitespace after a closing brace. | ||
| 599 | (while (search-forward "}[ \t]+$" nil t) | ||
| 600 | (error "Brace not last char of line!")) | ||
| 601 | (goto-char point) | ||
| 602 | (message "Bibtex buffer appears o.k."))) | ||
| 603 | |||
| 604 | (defun find-bibtex-duplicates () | ||
| 605 | "Searches forward in current buffer looking for duplicate bibtex entries. | ||
| 606 | Buffer is assumed to be sorted, see \\[sort-bibtex-entries]" | ||
| 607 | (interactive) | ||
| 608 | (let ((point (point))) | ||
| 609 | ;; errors if things are not right... | ||
| 610 | (find-bibtex-entry-location (make-string 10 255)) | ||
| 611 | (goto-char point) | ||
| 612 | (message "No duplicates found!"))) | ||
| 613 | |||
| 614 | |||
| 615 | (defvar bibtex-maintain-sorted-entries nil | ||
| 616 | "*If true, bibtex-mode will attempt to maintain all bibtex entries in | ||
| 617 | sorted order.") | ||
| 465 | 618 | ||
| 466 | ;; | 619 | ;; |
| 467 | ;; note: this should really take lists of strings OR of lists. in the | 620 | ;; note: this should really take lists of strings OR of lists. in the |
| @@ -470,58 +623,69 @@ non-nil." | |||
| 470 | ;; | 623 | ;; |
| 471 | 624 | ||
| 472 | (defun bibtex-entry (entry-type required optional) | 625 | (defun bibtex-entry (entry-type required optional) |
| 473 | (bibtex-move-outside-of-entry) | 626 | (let (key) |
| 474 | (insert "@" entry-type "{") | 627 | (if bibtex-maintain-sorted-entries |
| 475 | (mapcar 'bibtex-make-field required) | 628 | (progn |
| 476 | (if bibtex-include-OPTcrossref | 629 | (setq key (read-string (format "%s key: " entry-type))) |
| 477 | (bibtex-make-optional-field "crossref")) | 630 | (find-bibtex-entry-location key))) |
| 478 | (if bibtex-include-OPTkey | 631 | (bibtex-move-outside-of-entry) |
| 479 | (bibtex-make-optional-field "key")) | 632 | (insert "@" entry-type "{") |
| 480 | (mapcar 'bibtex-make-optional-field optional) | 633 | (mapcar 'bibtex-make-field required) |
| 481 | (if bibtex-mode-user-optional-fields ;MON... | 634 | (if bibtex-include-OPTcrossref |
| 482 | (mapcar 'bibtex-make-optional-field | 635 | (bibtex-make-optional-field "crossref")) |
| 483 | bibtex-mode-user-optional-fields)) | 636 | (if bibtex-include-OPTkey |
| 484 | (if bibtex-include-OPTannote | 637 | (bibtex-make-optional-field "key")) |
| 485 | (bibtex-make-optional-field "annote")) | 638 | (mapcar 'bibtex-make-optional-field optional) |
| 486 | (insert "\n}\n\n") | 639 | (if bibtex-mode-user-optional-fields ;MON... |
| 487 | (forward-char -3) | 640 | (mapcar 'bibtex-make-optional-field |
| 488 | (up-list -1) | 641 | bibtex-mode-user-optional-fields)) |
| 489 | (forward-char 1)) | 642 | (if bibtex-include-OPTannote |
| 490 | 643 | (bibtex-make-optional-field "annote")) | |
| 491 | (defun bibtex-insert-field-delimeters (str) | 644 | (insert "\n}\n\n") |
| 492 | "Insert double quotes (default) or, if STR is in the list | 645 | (forward-char -3) |
| 493 | bibtex-curly-delimeters, insert curly brackets." | 646 | (up-list -1) |
| 494 | (if (and (boundp 'bibtex-curly-delimeters) | 647 | (forward-char 1) |
| 495 | bibtex-curly-delimeters | 648 | (if key |
| 496 | (memq (car (read-from-string (downcase str))) | 649 | (progn |
| 497 | bibtex-curly-delimeters)) | 650 | (insert key) |
| 498 | (insert "\{\}") | 651 | (bibtex-next-field t))))) |
| 499 | (insert "\"\""))) | 652 | |
| 653 | ;; (defun bibtex-entry (entry-type required optional) | ||
| 654 | ;; (bibtex-move-outside-of-entry) | ||
| 655 | ;; (insert (concat "@" entry-type "{,\n\n}\n\n")) | ||
| 656 | ;; (previous-line 3) | ||
| 657 | ;; (insert (mapconcat 'bibtex-make-entry required ",\n")) | ||
| 658 | ;; (if required | ||
| 659 | ;; (if optional | ||
| 660 | ;; (insert ",\n"))) | ||
| 661 | ;; (insert (mapconcat 'bibtex-make-OPT-entry optional ",\n")) | ||
| 662 | ;; (if bibtex-mode-user-optional-fields ;MON... | ||
| 663 | ;; (progn | ||
| 664 | ;; (if optional | ||
| 665 | ;; (insert ",\n")) | ||
| 666 | ;; (insert (mapconcat 'bibtex-make-OPT-entry | ||
| 667 | ;; bibtex-mode-user-optional-fields | ||
| 668 | ;; ",\n")))) ;MON | ||
| 669 | ;; (up-list -1) | ||
| 670 | ;; (forward-char 1)) | ||
| 671 | |||
| 500 | 672 | ||
| 501 | (defun bibtex-make-field (str) | 673 | (defun bibtex-make-field (str) |
| 502 | (interactive "sBibTeX entry type: ") | 674 | (interactive "sBibTeX entry type: ") |
| 503 | (insert ",\n") | 675 | (insert ",\n") |
| 504 | (indent-to-column bibtex-name-alignment) | 676 | (indent-to-column bibtex-name-alignement) |
| 505 | (insert str " = ") | 677 | (insert str " = ") |
| 506 | (indent-to-column bibtex-text-alignment) | 678 | (indent-to-column bibtex-text-alignment) |
| 507 | (bibtex-insert-field-delimeters str) | 679 | (insert "\"\"") |
| 508 | nil) | 680 | nil) |
| 509 | 681 | ||
| 510 | ;; modified to make fields align up _after_ the OPT's have been removed | ||
| 511 | |||
| 512 | (defun bibtex-make-optional-field (str) | 682 | (defun bibtex-make-optional-field (str) |
| 513 | (interactive "sOptional BibTeX entry type: ") | 683 | (interactive "sOptional BibTeX entry type: ") |
| 514 | (insert ",\n") | 684 | (insert ",\n") |
| 515 | (indent-to-column bibtex-name-alignment) | 685 | (indent-to-column bibtex-name-alignement) |
| 516 | (insert str " = ") | 686 | (insert "OPT" str " = ") |
| 517 | (indent-to-column bibtex-text-alignment) ;align nicely, then,... | 687 | (indent-to-column bibtex-text-alignment) |
| 518 | (bibtex-insert-field-delimeters str) | 688 | (insert "\"\"") |
| 519 | (if bibtex-use-OPT-prefix | ||
| 520 | (progn | ||
| 521 | (beginning-of-line) | ||
| 522 | (move-to-column bibtex-name-alignment) ;go back to name and put in OPT | ||
| 523 | (insert "OPT") | ||
| 524 | (end-of-line))) | ||
| 525 | nil) | 689 | nil) |
| 526 | 690 | ||
| 527 | ;; What to do about crossref? if present, journal and year are | 691 | ;; What to do about crossref? if present, journal and year are |
| @@ -536,11 +700,12 @@ bibtex-curly-delimeters, insert curly brackets." | |||
| 536 | (bibtex-entry "Article" '("author" "title" "journal" "year") | 700 | (bibtex-entry "Article" '("author" "title" "journal" "year") |
| 537 | '("volume" "number" "pages" "month" "note")))) | 701 | '("volume" "number" "pages" "month" "note")))) |
| 538 | 702 | ||
| 703 | |||
| 539 | (defun bibtex-Book () | 704 | (defun bibtex-Book () |
| 540 | (interactive) | 705 | (interactive) |
| 541 | (bibtex-entry "Book" '("author" "title" "publisher" "year") | 706 | (bibtex-entry "Book" '("author" "title" "publisher" "year") |
| 542 | '("editor" "volume" "number" "series" "address" | 707 | '("editor" "volume" "number" "series" "address" |
| 543 | "edition" "month" "note"))) | 708 | "edition" "month" "note"))) |
| 544 | 709 | ||
| 545 | (defun bibtex-Booklet () | 710 | (defun bibtex-Booklet () |
| 546 | (interactive) | 711 | (interactive) |
| @@ -563,31 +728,31 @@ bibtex-curly-delimeters, insert curly brackets." | |||
| 563 | '("editor" "pages" "volume" "number" "series" "address" | 728 | '("editor" "pages" "volume" "number" "series" "address" |
| 564 | "edition" "month" "type" "note")))) | 729 | "edition" "month" "type" "note")))) |
| 565 | 730 | ||
| 566 | ;; In next 2, for crossref case, put pages near beginning of | ||
| 567 | ;; optionals as it will be used most often -- MON | ||
| 568 | (defun bibtex-InCollection () | 731 | (defun bibtex-InCollection () |
| 569 | (interactive) | 732 | (interactive) |
| 570 | (if bibtex-include-OPTcrossref | 733 | (if bibtex-include-OPTcrossref |
| 571 | (bibtex-entry "InCollection" '("author" "title") | 734 | (bibtex-entry "InCollection" '("author" "title") |
| 572 | '("pages" "booktitle" "publisher" "year" | 735 | '("booktitle" "publisher" "year" |
| 573 | "editor" "volume" "number" "series" "type" "chapter" | 736 | "editor" "volume" "number" "series" "type" "chapter" |
| 574 | "address" "edition" "month" "note")) | 737 | "pages" "address" "edition" "month" "note")) |
| 575 | (bibtex-entry "InCollection" '("author" "title" | 738 | (bibtex-entry "InCollection" '("author" "title" |
| 576 | "booktitle" "publisher" "year") | 739 | "booktitle" "publisher" "year") |
| 577 | '("editor" "volume" "number" "series" "type" "chapter" | 740 | '("editor" "volume" "number" "series" "type" "chapter" |
| 578 | "pages" "address" "edition" "month" "note")))) | 741 | "pages" "address" "edition" "month" "note")))) |
| 579 | 742 | ||
| 743 | |||
| 580 | (defun bibtex-InProceedings () | 744 | (defun bibtex-InProceedings () |
| 581 | (interactive) | 745 | (interactive) |
| 582 | (if bibtex-include-OPTcrossref | 746 | (if bibtex-include-OPTcrossref |
| 583 | (bibtex-entry "InProceedings" '("author" "title") | 747 | (bibtex-entry "InProceedings" '("author" "title") |
| 584 | '( "pages" "editor" "volume" "number" "series" | 748 | '("editor" "volume" "number" "series" "pages" |
| 585 | "booktitle" "year" | 749 | "booktitle" "year" |
| 586 | "organization" "publisher" "address" "month" "note")) | 750 | "organization" "publisher" "address" "month" "note")) |
| 587 | (bibtex-entry "InProceedings" '("author" "title" "booktitle" "year") | 751 | (bibtex-entry "InProceedings" '("author" "title" "booktitle" "year") |
| 588 | '("editor" "volume" "number" "series" "pages" | 752 | '("editor" "volume" "number" "series" "pages" |
| 589 | "organization" "publisher" "address" "month" "note")))) | 753 | "organization" "publisher" "address" "month" "note")))) |
| 590 | 754 | ||
| 755 | |||
| 591 | (defun bibtex-Manual () | 756 | (defun bibtex-Manual () |
| 592 | (interactive) | 757 | (interactive) |
| 593 | (bibtex-entry "Manual" '("title") | 758 | (bibtex-entry "Manual" '("title") |
| @@ -620,7 +785,6 @@ bibtex-curly-delimeters, insert curly brackets." | |||
| 620 | (bibtex-entry "TechReport" '("author" "title" "institution" "year") | 785 | (bibtex-entry "TechReport" '("author" "title" "institution" "year") |
| 621 | '("type" "number" "address" "month" "note"))) | 786 | '("type" "number" "address" "month" "note"))) |
| 622 | 787 | ||
| 623 | |||
| 624 | (defun bibtex-Unpublished () | 788 | (defun bibtex-Unpublished () |
| 625 | (interactive) | 789 | (interactive) |
| 626 | (bibtex-entry "Unpublished" '("author" "title" "note") | 790 | (bibtex-entry "Unpublished" '("author" "title" "note") |
| @@ -656,6 +820,17 @@ bibtex-curly-delimeters, insert curly brackets." | |||
| 656 | (forward-char 1)))) | 820 | (forward-char 1)))) |
| 657 | (bibtex-find-text arg)) | 821 | (bibtex-find-text arg)) |
| 658 | 822 | ||
| 823 | ;; (defun bibtex-next-field () | ||
| 824 | ;; "Finds end of text of next field." | ||
| 825 | ;; (interactive) | ||
| 826 | ;; (condition-case () | ||
| 827 | ;; (progn | ||
| 828 | ;; (bibtex-inside-field) | ||
| 829 | ;; (re-search-forward ",[ \t\n]*" (point-max) 1) | ||
| 830 | ;; (bibtex-enclosing-field) | ||
| 831 | ;; (bibtex-inside-field)) | ||
| 832 | ;; (error nil))) | ||
| 833 | |||
| 659 | (defun bibtex-find-text (arg) | 834 | (defun bibtex-find-text (arg) |
| 660 | "Go to end of text of current field; with arg, go to beginning." | 835 | "Go to end of text of current field; with arg, go to beginning." |
| 661 | (interactive "P") | 836 | (interactive "P") |
| @@ -664,12 +839,23 @@ bibtex-curly-delimeters, insert curly brackets." | |||
| 664 | (if arg | 839 | (if arg |
| 665 | (progn | 840 | (progn |
| 666 | (goto-char (match-beginning bibtex-text-in-field)) | 841 | (goto-char (match-beginning bibtex-text-in-field)) |
| 667 | (if (or (looking-at "\"") (looking-at "{")) | 842 | (if (looking-at "\"") |
| 668 | (forward-char 1))) | 843 | (forward-char 1))) |
| 669 | (goto-char (match-end bibtex-text-in-field)) | 844 | (goto-char (match-end bibtex-text-in-field)) |
| 670 | (if (or (= (preceding-char) ?\") (= (preceding-char) ?})) | 845 | (if (= (preceding-char) ?\") |
| 671 | (forward-char -1)))) | 846 | (forward-char -1)))) |
| 672 | 847 | ||
| 848 | ;; (defun bibtex-find-text () | ||
| 849 | ;; "Go to end of text of current field." | ||
| 850 | ;; (interactive) | ||
| 851 | ;; (condition-case () | ||
| 852 | ;; (progn | ||
| 853 | ;; (bibtex-inside-field) | ||
| 854 | ;; (bibtex-enclosing-field) | ||
| 855 | ;; (goto-char (match-end bibtex-text-in-field)) | ||
| 856 | ;; (bibtex-inside-field)) | ||
| 857 | ;; (error nil))) | ||
| 858 | |||
| 673 | (defun bibtex-remove-OPT () | 859 | (defun bibtex-remove-OPT () |
| 674 | "Removes the 'OPT' starting optional arguments and goes to end of text" | 860 | "Removes the 'OPT' starting optional arguments and goes to end of text" |
| 675 | (interactive) | 861 | (interactive) |
| @@ -685,12 +871,11 @@ bibtex-curly-delimeters, insert curly brackets." | |||
| 685 | "Try to avoid point being at end of a bibtex field." | 871 | "Try to avoid point being at end of a bibtex field." |
| 686 | (interactive) | 872 | (interactive) |
| 687 | (end-of-line) | 873 | (end-of-line) |
| 688 | (skip-chars-backward " \t") ;delete these chars? -- MON | 874 | (skip-chars-backward " \t") ;MON - maybe delete these chars? |
| 689 | (cond ((= (preceding-char) ?,) | 875 | (cond ((= (preceding-char) ?,) |
| 690 | (forward-char -1))) | 876 | (forward-char -1))) |
| 691 | (cond ((or (= (preceding-char) ?\") (= (preceding-char) ?\})) | 877 | (cond ((= (preceding-char) ?\") |
| 692 | (forward-char -1)))) ;only go back if quote | 878 | (forward-char -1)))) ;MON - only go back if quote |
| 693 | |||
| 694 | 879 | ||
| 695 | (defun bibtex-remove-double-quotes () | 880 | (defun bibtex-remove-double-quotes () |
| 696 | "Removes """" around string." | 881 | "Removes """" around string." |
| @@ -905,7 +1090,7 @@ an undefined location. | |||
| 905 | (re-search-forward regexp right nil 1) | 1090 | (re-search-forward regexp right nil 1) |
| 906 | (if (> (match-beginning 0) initial) | 1091 | (if (> (match-beginning 0) initial) |
| 907 | (signal 'search-failed (list regexp))) | 1092 | (signal 'search-failed (list regexp))) |
| 908 | (while (< (match-end 0) initial) ;<= --> < -- MON | 1093 | (while (<= (match-end 0) initial) |
| 909 | (re-search-forward regexp right nil 1) | 1094 | (re-search-forward regexp right nil 1) |
| 910 | (if (> (match-beginning 0) initial) | 1095 | (if (> (match-beginning 0) initial) |
| 911 | (signal 'search-failed (list regexp)))) | 1096 | (signal 'search-failed (list regexp)))) |
| @@ -932,16 +1117,9 @@ an undefined location. | |||
| 932 | (looking-at "OPT") | 1117 | (looking-at "OPT") |
| 933 | bibtex-clean-entry-zap-empty-opts) | 1118 | bibtex-clean-entry-zap-empty-opts) |
| 934 | (goto-char begin-text) | 1119 | (goto-char begin-text) |
| 935 | (if (and (looking-at "\"\"") ; empty: delete whole field | 1120 | (if (looking-at "\"\"") ; empty: delete whole field |
| 936 | (boundp 'bibtex-save-OPT) | ||
| 937 | bibtex-save-OPT | ||
| 938 | (not (memq (car (read-from-string | ||
| 939 | (buffer-substring | ||
| 940 | (+ begin-name 3) | ||
| 941 | end-name))) | ||
| 942 | bibtex-save-OPT))) | ||
| 943 | (delete-region begin-field end-field) | 1121 | (delete-region begin-field end-field) |
| 944 | ;; otherwise: not empty, delete "OPT" | 1122 | ; otherwise: not empty, delete "OPT" |
| 945 | (goto-char begin-name) | 1123 | (goto-char begin-name) |
| 946 | (delete-char (length "OPT")) | 1124 | (delete-char (length "OPT")) |
| 947 | (goto-char begin-field) ; and loop to go through next test | 1125 | (goto-char begin-field) ; and loop to go through next test |
| @@ -965,12 +1143,7 @@ an undefined location. | |||
| 965 | (equal (buffer-substring | 1143 | (equal (buffer-substring |
| 966 | begin-name | 1144 | begin-name |
| 967 | (+ begin-name 3)) | 1145 | (+ begin-name 3)) |
| 968 | "opt") | 1146 | "opt"))) |
| 969 | (memq (car (read-from-string | ||
| 970 | (buffer-substring | ||
| 971 | begin-name | ||
| 972 | end-name))) | ||
| 973 | bibtex-save-OPT))) | ||
| 974 | (error "Mandatory field ``%s'' is empty" | 1147 | (error "Mandatory field ``%s'' is empty" |
| 975 | (buffer-substring begin-name end-name)))) | 1148 | (buffer-substring begin-name end-name)))) |
| 976 | (t | 1149 | (t |
| @@ -1039,66 +1212,49 @@ an undefined location. | |||
| 1039 | ;; since we aren't interested. See etc/SUN-SUPPORT for the reasons why | 1212 | ;; since we aren't interested. See etc/SUN-SUPPORT for the reasons why |
| 1040 | ;; we consider this nothing but a distraction from our work. | 1213 | ;; we consider this nothing but a distraction from our work. |
| 1041 | 1214 | ||
| 1042 | (if (fboundp 'defmenu) | 1215 | (defmacro eval-in-menu-window (&rest l) |
| 1043 | (progn | 1216 | "Evaluates its argument in the window in which the mouse button was pressed." |
| 1044 | 1217 | (list 'eval-in-window '*menu-window* l)) | |
| 1045 | (defmenu bibtex-sun-entry-menu | 1218 | |
| 1046 | ("Article In Conf. Proc." | 1219 | ;(defmenu bibtex-sun-entry-menu |
| 1047 | (lambda () (eval-in-window *menu-window* (bibtex-InProceedings)))) | 1220 | ; ("Article In Conf. Proc." eval-in-menu-window bibtex-InProceedings) |
| 1048 | ("Article In Journal" | 1221 | ; ("Article In Journal" eval-in-menu-window bibtex-Article) |
| 1049 | (lambda () (eval-in-window *menu-window* (bibtex-Article)))) | 1222 | ; ("Book" eval-in-menu-window bibtex-Book) |
| 1050 | ("Book" | 1223 | ; ("Booklet" eval-in-menu-window bibtex-Booklet) |
| 1051 | (lambda () (eval-in-window *menu-window* (bibtex-Book)))) | 1224 | ; ("Master's Thesis" eval-in-menu-window bibtex-MastersThesis) |
| 1052 | ("Booklet" | 1225 | ; ("PhD. Thesis" eval-in-menu-window bibtex-PhdThesis) |
| 1053 | (lambda () (eval-in-window *menu-window* (bibtex-Booklet)))) | 1226 | ; ("Technical Report" eval-in-menu-window bibtex-TechReport) |
| 1054 | ("Master's Thesis" | 1227 | ; ("Technical Manual" eval-in-menu-window bibtex-Manual) |
| 1055 | (lambda () (eval-in-window *menu-window* (bibtex-MastersThesis)))) | 1228 | ; ("Conference Proceedings" eval-in-menu-window bibtex-Proceedings) |
| 1056 | ;;("DEA Thesis" bibtex-DEAthesis) | 1229 | ; ("In A Book" eval-in-menu-window bibtex-InBook) |
| 1057 | ("PhD. Thesis" | 1230 | ; ("In A Collection" eval-in-menu-window bibtex-InCollection) |
| 1058 | (lambda () (eval-in-window *menu-window* (bibtex-PhdThesis)))) | 1231 | ; ("Miscellaneous" eval-in-menu-window bibtex-Misc) |
| 1059 | ("Technical Report" | 1232 | ; ("Unpublished" eval-in-menu-window bibtex-Unpublished) |
| 1060 | (lambda () (eval-in-window *menu-window* (bibtex-TechReport)))) | 1233 | ; ("string" eval-in-menu-window bibtex-string) |
| 1061 | ("Technical Manual" | 1234 | ; ("preamble" eval-in-menu-window bibtex-preamble)) |
| 1062 | (lambda () (eval-in-window *menu-window* (bibtex-Manual)))) | 1235 | ; |
| 1063 | ("Conference Proceedings" | 1236 | ;(defmenu bibtex-sun-menu |
| 1064 | (lambda () (eval-in-window *menu-window* (bibtex-Proceedings)))) | 1237 | ; ("BibTeX menu") |
| 1065 | ("In A Book" | 1238 | ; ("add entry" . bibtex-sun-entry-menu) |
| 1066 | (lambda () (eval-in-window *menu-window* (bibtex-InBook)))) | 1239 | ; ("next field" eval-in-menu-window bibtex-next-field nil) |
| 1067 | ("In A Collection" | 1240 | ; ("to end of field" eval-in-menu-window bibtex-find-text nil) |
| 1068 | (lambda () (eval-in-window *menu-window* (bibtex-InCollection)))) | 1241 | ; ("snatch similar preceding field" eval-in-menu-window bibtex-pop-previous 1) |
| 1069 | ("Miscellaneous" | 1242 | ; ("snatch similar following field" eval-in-menu-window bibtex-pop-next 1) |
| 1070 | (lambda () (eval-in-window *menu-window* (bibtex-Misc)))) | 1243 | ; ("remove OPT" eval-in-menu-window bibtex-remove-OPT) |
| 1071 | ("Unpublished" | 1244 | ; ("remove quotes" eval-in-menu-window bibtex-remove-double-quotes) |
| 1072 | (lambda () (eval-in-window *menu-window* (bibtex-Unpublished))))) | 1245 | ; ("clean entry" eval-in-menu-window bibtex-clean-entry) |
| 1073 | 1246 | ; ("describe BibTeX mode" eval-in-menu-window describe-mode) | |
| 1074 | (defmenu bibtex-sun-menu | 1247 | ; ("Main Emacs menu" . emacs-menu)) |
| 1075 | ("BibTeX menu") | ||
| 1076 | ("add entry" . bibtex-sun-entry-menu) | ||
| 1077 | ("add string" | ||
| 1078 | (lambda () (eval-in-window *menu-window* (bibtex-string)))) | ||
| 1079 | ;("next field" bibtex-next-position) | ||
| 1080 | ;("to end of field" bibtex-find-it) | ||
| 1081 | ; ("remove OPT" | ||
| 1082 | ; (lambda () (eval-in-window *menu-window* (bibtex-remove-opt)))) | ||
| 1083 | ; ("remove quotes" | ||
| 1084 | ; (lambda () (eval-in-window *menu-window* (bibtex-remove-double-quotes)))) | ||
| 1085 | ; ("remove this line" | ||
| 1086 | ; (lambda () (eval-in-window *menu-window* (kill-current-line)))) | ||
| 1087 | ("describe BibTeX mode" | ||
| 1088 | (lambda () (eval-in-window *menu-window* (describe-mode)))) | ||
| 1089 | ("Main Emacs menu" . emacs-menu)) | ||
| 1090 | 1248 | ||
| 1091 | (defun bibtex-sun-menu-eval (window x y) | 1249 | (defun bibtex-sun-menu-eval (window x y) |
| 1092 | "Pop-up menu of BibTeX commands." | 1250 | "Pop-up menu of BibTeX commands." |
| 1093 | (sun-menu-evaluate window (1+ x) (1- y) 'bibtex-sun-menu)) | 1251 | (sun-menu-evaluate window (1+ x) (1- y) 'bibtex-sun-menu)) |
| 1094 | 1252 | ||
| 1095 | (defun bibtex-sun-environment () | 1253 | (defun bibtex-sun-environment () |
| 1096 | "Set up sun menus for BibTeX mode. Call it as bibtex-mode-hook, or interactively" | 1254 | "Set up sun menus for BibTeX mode. Call it as bibtex-mode-hook, or |
| 1255 | interactively" | ||
| 1097 | (interactive) | 1256 | (interactive) |
| 1098 | (local-set-mouse '(text right) 'bibtex-sun-menu-eval)) | 1257 | (local-set-mouse '(text right) 'bibtex-sun-menu-eval)) |
| 1099 | 1258 | ||
| 1100 | )) ; matches (if... | 1259 | ;;; bibtex-mode.el ends here |
| 1101 | |||
| 1102 | (provide 'bibtex) | ||
| 1103 | 1260 | ||
| 1104 | ;;; bibtex.el ends here | ||
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index e4e02a68f67..85a9c1dd2e4 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el | |||
| @@ -1,12 +1,15 @@ | |||
| 1 | ;;; fill.el --- fill commands for Emacs | 1 | ;;; fill.el --- fill commands for Emacs |
| 2 | 2 | ||
| 3 | ;; Maintainer: FSF | ||
| 4 | ;; Last-Modified: 24 Jun 1992 | ||
| 5 | |||
| 3 | ;; Copyright (C) 1985, 1986, 1992 Free Software Foundation, Inc. | 6 | ;; Copyright (C) 1985, 1986, 1992 Free Software Foundation, Inc. |
| 4 | 7 | ||
| 5 | ;; This file is part of GNU Emacs. | 8 | ;; This file is part of GNU Emacs. |
| 6 | 9 | ||
| 7 | ;; GNU Emacs is free software; you can redistribute it and/or modify | 10 | ;; GNU Emacs is free software; you can redistribute it and/or modify |
| 8 | ;; it under the terms of the GNU General Public License as published by | 11 | ;; it under the terms of the GNU General Public License as published by |
| 9 | ;; the Free Software Foundation; either version 1, or (at your option) | 12 | ;; the Free Software Foundation; either version 2, or (at your option) |
| 10 | ;; any later version. | 13 | ;; any later version. |
| 11 | 14 | ||
| 12 | ;; GNU Emacs is distributed in the hope that it will be useful, | 15 | ;; GNU Emacs is distributed in the hope that it will be useful, |
| @@ -18,6 +21,7 @@ | |||
| 18 | ;; along with GNU Emacs; see the file COPYING. If not, write to | 21 | ;; along with GNU Emacs; see the file COPYING. If not, write to |
| 19 | ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | 22 | ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
| 20 | 23 | ||
| 24 | ;;; Code: | ||
| 21 | 25 | ||
| 22 | (defconst fill-individual-varying-indent nil | 26 | (defconst fill-individual-varying-indent nil |
| 23 | "*Controls criterion for a new paragraph in `fill-individual-paragraphs'. | 27 | "*Controls criterion for a new paragraph in `fill-individual-paragraphs'. |
diff --git a/lisp/textmodes/nroff-mode.el b/lisp/textmodes/nroff-mode.el index 26d82a2f793..b05632c569e 100644 --- a/lisp/textmodes/nroff-mode.el +++ b/lisp/textmodes/nroff-mode.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; nroff-mode.el --- GNU Emacs major mode for editing nroff source | 1 | ;;; nroff-mode.el --- GNU Emacs major mode for editing nroff source |
| 2 | 2 | ||
| 3 | ;; Maintainer: FSF | 3 | ;; Maintainer: FSF |
| 4 | ;; Last-Modified: 9 May 1991 | 4 | ;; Last-Modified: 09 May 1991 |
| 5 | 5 | ||
| 6 | ;; Copyright (C) 1985, 1986 Free Software Foundation, Inc. | 6 | ;; Copyright (C) 1985, 1986 Free Software Foundation, Inc. |
| 7 | 7 | ||
| @@ -9,7 +9,7 @@ | |||
| 9 | 9 | ||
| 10 | ;; GNU Emacs is free software; you can redistribute it and/or modify | 10 | ;; GNU Emacs is free software; you can redistribute it and/or modify |
| 11 | ;; it under the terms of the GNU General Public License as published by | 11 | ;; it under the terms of the GNU General Public License as published by |
| 12 | ;; the Free Software Foundation; either version 1, or (at your option) | 12 | ;; the Free Software Foundation; either version 2, or (at your option) |
| 13 | ;; any later version. | 13 | ;; any later version. |
| 14 | 14 | ||
| 15 | ;; GNU Emacs is distributed in the hope that it will be useful, | 15 | ;; GNU Emacs is distributed in the hope that it will be useful, |
diff --git a/lisp/textmodes/ooutline.el b/lisp/textmodes/ooutline.el index ad7512d6cf7..036e5d6bb63 100644 --- a/lisp/textmodes/ooutline.el +++ b/lisp/textmodes/ooutline.el | |||
| @@ -1,12 +1,15 @@ | |||
| 1 | ;;; outline.el --- outline mode commands for Emacs | 1 | ;;; outline.el --- outline mode commands for Emacs |
| 2 | 2 | ||
| 3 | ;; Maintainer: FSF | ||
| 4 | ;; Last-Modified: 10 Apr 1991 | ||
| 5 | |||
| 3 | ;; Copyright (C) 1986 Free Software Foundation, Inc. | 6 | ;; Copyright (C) 1986 Free Software Foundation, Inc. |
| 4 | 7 | ||
| 5 | ;; This file is part of GNU Emacs. | 8 | ;; This file is part of GNU Emacs. |
| 6 | 9 | ||
| 7 | ;; GNU Emacs is free software; you can redistribute it and/or modify | 10 | ;; GNU Emacs is free software; you can redistribute it and/or modify |
| 8 | ;; it under the terms of the GNU General Public License as published by | 11 | ;; it under the terms of the GNU General Public License as published by |
| 9 | ;; the Free Software Foundation; either version 1, or (at your option) | 12 | ;; the Free Software Foundation; either version 2, or (at your option) |
| 10 | ;; any later version. | 13 | ;; any later version. |
| 11 | 14 | ||
| 12 | ;; GNU Emacs is distributed in the hope that it will be useful, | 15 | ;; GNU Emacs is distributed in the hope that it will be useful, |
| @@ -18,6 +21,8 @@ | |||
| 18 | ;; along with GNU Emacs; see the file COPYING. If not, write to | 21 | ;; along with GNU Emacs; see the file COPYING. If not, write to |
| 19 | ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | 22 | ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
| 20 | 23 | ||
| 24 | ;;; Code: | ||
| 25 | |||
| 21 | ;; Jan '86, Some new features added by Peter Desnoyers and rewritten by RMS. | 26 | ;; Jan '86, Some new features added by Peter Desnoyers and rewritten by RMS. |
| 22 | 27 | ||
| 23 | (defvar outline-regexp "[*\^l]+" | 28 | (defvar outline-regexp "[*\^l]+" |
diff --git a/lisp/textmodes/page-ext.el b/lisp/textmodes/page-ext.el index c5457fa5e5d..53953cb65be 100644 --- a/lisp/textmodes/page-ext.el +++ b/lisp/textmodes/page-ext.el | |||
| @@ -1,18 +1,15 @@ | |||
| 1 | ;;; page-ext.el --- page handling commands | 1 | ;;; page-ext.el --- page handling commands |
| 2 | 2 | ||
| 3 | ;;; by Robert J. Chassell | 3 | ;; Author: Robert J. Chassell <bob@gnu.ai.mit.edu> |
| 4 | 4 | ;; Last-Modified: 10 Apr 1991 | |
| 5 | ;;; You may use these commands to handle an address list or other | ||
| 6 | ;;; small data base. | ||
| 7 | 5 | ||
| 8 | ;;; Copyright (C) 1990 Free Software Foundation | 6 | ;;; Copyright (C) 1990 Free Software Foundation |
| 9 | ;;; Please send bug reports to bob@ai.mit.edu | ||
| 10 | 7 | ||
| 11 | ;; This file is part of GNU Emacs. | 8 | ;; This file is part of GNU Emacs. |
| 12 | 9 | ||
| 13 | ;; GNU Emacs is free software; you can redistribute it and/or modify | 10 | ;; GNU Emacs is free software; you can redistribute it and/or modify |
| 14 | ;; it under the terms of the GNU General Public License as published by | 11 | ;; it under the terms of the GNU General Public License as published by |
| 15 | ;; the Free Software Foundation; either version 1, or (at your option) | 12 | ;; the Free Software Foundation; either version 2, or (at your option) |
| 16 | ;; any later version. | 13 | ;; any later version. |
| 17 | 14 | ||
| 18 | ;; GNU Emacs is distributed in the hope that it will be useful, | 15 | ;; GNU Emacs is distributed in the hope that it will be useful, |
| @@ -24,6 +21,13 @@ | |||
| 24 | ;; along with GNU Emacs; see the file COPYING. If not, write to | 21 | ;; along with GNU Emacs; see the file COPYING. If not, write to |
| 25 | ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | 22 | ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
| 26 | 23 | ||
| 24 | ;;; Commentary: | ||
| 25 | |||
| 26 | ;;; You may use these commands to handle an address list or other | ||
| 27 | ;;; small data base. | ||
| 28 | |||
| 29 | ;;; Change Log: | ||
| 30 | |||
| 27 | ;;; Change Log ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 31 | ;;; Change Log ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 28 | ;;; | 32 | ;;; |
| 29 | ;;; Version 0.043 | 33 | ;;; Version 0.043 |
| @@ -132,6 +136,7 @@ | |||
| 132 | ;;; 28 Jan 1990 - Initial definitions. | 136 | ;;; 28 Jan 1990 - Initial definitions. |
| 133 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 137 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 134 | 138 | ||
| 139 | ;;; Code: | ||
| 135 | 140 | ||
| 136 | ;;;; Summary | 141 | ;;;; Summary |
| 137 | 142 | ||
diff --git a/lisp/textmodes/page.el b/lisp/textmodes/page.el index 935e19bdba4..65cad14e6ed 100644 --- a/lisp/textmodes/page.el +++ b/lisp/textmodes/page.el | |||
| @@ -1,12 +1,15 @@ | |||
| 1 | ;;; page.el --- page motion commands for emacs. | 1 | ;;; page.el --- page motion commands for emacs. |
| 2 | 2 | ||
| 3 | ;; Maintainer: FSF | ||
| 4 | ;; Last-Modified: 01 May 1992 | ||
| 5 | |||
| 3 | ;; Copyright (C) 1985 Free Software Foundation, Inc. | 6 | ;; Copyright (C) 1985 Free Software Foundation, Inc. |
| 4 | 7 | ||
| 5 | ;; This file is part of GNU Emacs. | 8 | ;; This file is part of GNU Emacs. |
| 6 | 9 | ||
| 7 | ;; GNU Emacs is free software; you can redistribute it and/or modify | 10 | ;; GNU Emacs is free software; you can redistribute it and/or modify |
| 8 | ;; it under the terms of the GNU General Public License as published by | 11 | ;; it under the terms of the GNU General Public License as published by |
| 9 | ;; the Free Software Foundation; either version 1, or (at your option) | 12 | ;; the Free Software Foundation; either version 2, or (at your option) |
| 10 | ;; any later version. | 13 | ;; any later version. |
| 11 | 14 | ||
| 12 | ;; GNU Emacs is distributed in the hope that it will be useful, | 15 | ;; GNU Emacs is distributed in the hope that it will be useful, |
| @@ -18,6 +21,7 @@ | |||
| 18 | ;; along with GNU Emacs; see the file COPYING. If not, write to | 21 | ;; along with GNU Emacs; see the file COPYING. If not, write to |
| 19 | ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | 22 | ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
| 20 | 23 | ||
| 24 | ;;; Code: | ||
| 21 | 25 | ||
| 22 | (defun forward-page (&optional count) | 26 | (defun forward-page (&optional count) |
| 23 | "Move forward to page boundary. With arg, repeat, or go back if negative. | 27 | "Move forward to page boundary. With arg, repeat, or go back if negative. |
diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el index 516ccd646de..dd0e941c195 100644 --- a/lisp/textmodes/picture.el +++ b/lisp/textmodes/picture.el | |||
| @@ -1,13 +1,16 @@ | |||
| 1 | ;;; picture.el --- "Picture mode" -- editing using quarter-plane screen model. | 1 | ;;; picture.el --- "Picture mode" -- editing using quarter-plane screen model. |
| 2 | 2 | ||
| 3 | ;; Author: K. Shane Hartman | ||
| 4 | ;; Maintainer: FSF | ||
| 5 | ;; Last-Modified: 16 Mar 1992 | ||
| 6 | |||
| 3 | ;; Copyright (C) 1985 Free Software Foundation, Inc. | 7 | ;; Copyright (C) 1985 Free Software Foundation, Inc. |
| 4 | ;; Principal author K. Shane Hartman | ||
| 5 | 8 | ||
| 6 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 7 | 10 | ||
| 8 | ;; GNU Emacs is free software; you can redistribute it and/or modify | 11 | ;; GNU Emacs is free software; you can redistribute it and/or modify |
| 9 | ;; it under the terms of the GNU General Public License as published by | 12 | ;; it under the terms of the GNU General Public License as published by |
| 10 | ;; the Free Software Foundation; either version 1, or (at your option) | 13 | ;; the Free Software Foundation; either version 2, or (at your option) |
| 11 | ;; any later version. | 14 | ;; any later version. |
| 12 | 15 | ||
| 13 | ;; GNU Emacs is distributed in the hope that it will be useful, | 16 | ;; GNU Emacs is distributed in the hope that it will be useful, |
| @@ -19,6 +22,7 @@ | |||
| 19 | ;; along with GNU Emacs; see the file COPYING. If not, write to | 22 | ;; along with GNU Emacs; see the file COPYING. If not, write to |
| 20 | ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | 23 | ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
| 21 | 24 | ||
| 25 | ;;; Code: | ||
| 22 | 26 | ||
| 23 | (defun move-to-column-force (column) | 27 | (defun move-to-column-force (column) |
| 24 | "Move to column COLUMN in current line. | 28 | "Move to column COLUMN in current line. |
diff --git a/lisp/textmodes/refbib.el b/lisp/textmodes/refbib.el index e0eb0614d70..a769877118d 100644 --- a/lisp/textmodes/refbib.el +++ b/lisp/textmodes/refbib.el | |||
| @@ -1,12 +1,15 @@ | |||
| 1 | ;;; refbib.el --- convert refer-style references to ones usable by Latex bib | 1 | ;;; refbib.el --- convert refer-style references to ones usable by Latex bib |
| 2 | 2 | ||
| 3 | ;; Maintainer: FSF | ||
| 4 | ;; Last-Modified: 16 Mar 1992 | ||
| 5 | |||
| 3 | ;; Copyright (C) 1989 Free Software Foundation, Inc. | 6 | ;; Copyright (C) 1989 Free Software Foundation, Inc. |
| 4 | 7 | ||
| 5 | ;; This file is part of GNU Emacs. | 8 | ;; This file is part of GNU Emacs. |
| 6 | 9 | ||
| 7 | ;; GNU Emacs is free software; you can redistribute it and/or modify | 10 | ;; GNU Emacs is free software; you can redistribute it and/or modify |
| 8 | ;; it under the terms of the GNU General Public License as published by | 11 | ;; it under the terms of the GNU General Public License as published by |
| 9 | ;; the Free Software Foundation; either version 1, or (at your option) | 12 | ;; the Free Software Foundation; either version 2, or (at your option) |
| 10 | ;; any later version. | 13 | ;; any later version. |
| 11 | 14 | ||
| 12 | ;; GNU Emacs is distributed in the hope that it will be useful, | 15 | ;; GNU Emacs is distributed in the hope that it will be useful, |
| @@ -18,11 +21,15 @@ | |||
| 18 | ;; along with GNU Emacs; see the file COPYING. If not, write to | 21 | ;; along with GNU Emacs; see the file COPYING. If not, write to |
| 19 | ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | 22 | ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
| 20 | 23 | ||
| 24 | ;;; Commentary: | ||
| 25 | |||
| 21 | ;; Use: from a buffer containing the refer-style bibliography, | 26 | ;; Use: from a buffer containing the refer-style bibliography, |
| 22 | ;; M-x r2b-convert-buffer | 27 | ;; M-x r2b-convert-buffer |
| 23 | ;; Program will prompt for an output buffer name, and will log | 28 | ;; Program will prompt for an output buffer name, and will log |
| 24 | ;; warnings during the conversion process in the buffer *Log*. | 29 | ;; warnings during the conversion process in the buffer *Log*. |
| 25 | 30 | ||
| 31 | ;;; Change Log: | ||
| 32 | |||
| 26 | ; HISTORY | 33 | ; HISTORY |
| 27 | ; 9/88, created | 34 | ; 9/88, created |
| 28 | ; modified 1/19/89, allow books with editor but no author; | 35 | ; modified 1/19/89, allow books with editor but no author; |
| @@ -45,6 +52,9 @@ | |||
| 45 | ; modified 3/1/89, fixed capitialize-title for first words all caps | 52 | ; modified 3/1/89, fixed capitialize-title for first words all caps |
| 46 | ; modified 3/15/89, allow use of " to delimit fields | 53 | ; modified 3/15/89, allow use of " to delimit fields |
| 47 | ; modified 4/18/89, properly "quote" special characters on output | 54 | ; modified 4/18/89, properly "quote" special characters on output |
| 55 | |||
| 56 | ;;; Code: | ||
| 57 | |||
| 48 | ;********************************************************** | 58 | ;********************************************************** |
| 49 | ; User Parameters | 59 | ; User Parameters |
| 50 | 60 | ||
diff --git a/lisp/textmodes/spell.el b/lisp/textmodes/spell.el index 63ef847b018..b9033e13dac 100644 --- a/lisp/textmodes/spell.el +++ b/lisp/textmodes/spell.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; spell.el --- spelling correction interface for Emacs. | 1 | ;;; spell.el --- spelling correction interface for Emacs. |
| 2 | 2 | ||
| 3 | ;; Maintainer: FSF | 3 | ;; Maintainer: FSF |
| 4 | ;; Last-Modified: 9 May 1991 | 4 | ;; Last-Modified: 09 May 1991 |
| 5 | 5 | ||
| 6 | ;; Copyright (C) 1985 Free Software Foundation, Inc. | 6 | ;; Copyright (C) 1985 Free Software Foundation, Inc. |
| 7 | 7 | ||
| @@ -9,7 +9,7 @@ | |||
| 9 | 9 | ||
| 10 | ;; GNU Emacs is free software; you can redistribute it and/or modify | 10 | ;; GNU Emacs is free software; you can redistribute it and/or modify |
| 11 | ;; it under the terms of the GNU General Public License as published by | 11 | ;; it under the terms of the GNU General Public License as published by |
| 12 | ;; the Free Software Foundation; either version 1, or (at your option) | 12 | ;; the Free Software Foundation; either version 2, or (at your option) |
| 13 | ;; any later version. | 13 | ;; any later version. |
| 14 | 14 | ||
| 15 | ;; GNU Emacs is distributed in the hope that it will be useful, | 15 | ;; GNU Emacs is distributed in the hope that it will be useful, |
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 545fcd34def..9b6fee482a5 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el | |||
| @@ -1,16 +1,18 @@ | |||
| 1 | ;;; tex-mode.el --- TeX, LaTeX, and SliTeX mode commands. | 1 | ;;; tex-mode.el --- TeX, LaTeX, and SliTeX mode commands. |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985, 1986, 1989, 1992 Free Software Foundation, Inc. | 3 | ;; Maintainer: Edward M. Reingold <reingold@cs.uiuc.edu> |
| 4 | ;; Last-Modified: 04 July 1992 | ||
| 5 | |||
| 4 | ;; Contributions over the years by William F. Schelter, Dick King, | 6 | ;; Contributions over the years by William F. Schelter, Dick King, |
| 5 | ;; Stephen Gildea, Michael Prange, and Edward M. Reingold. | 7 | ;; Stephen Gildea, Michael Prange, and Edward M. Reingold. |
| 6 | 8 | ||
| 7 | ;; Latest revision (1992) by Edward M. Reingold <reingold@cs.uiuc.edu>. | 9 | ;; Copyright (C) 1985, 1986, 1989, 1992 Free Software Foundation, Inc. |
| 8 | 10 | ||
| 9 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 10 | 12 | ||
| 11 | ;; GNU Emacs is free software; you can redistribute it and/or modify | 13 | ;; GNU Emacs is free software; you can redistribute it and/or modify |
| 12 | ;; it under the terms of the GNU General Public License as published by | 14 | ;; it under the terms of the GNU General Public License as published by |
| 13 | ;; the Free Software Foundation; either version 1, or (at your option) | 15 | ;; the Free Software Foundation; either version 2, or (at your option) |
| 14 | ;; any later version. | 16 | ;; any later version. |
| 15 | 17 | ||
| 16 | ;; GNU Emacs is distributed in the hope that it will be useful, | 18 | ;; GNU Emacs is distributed in the hope that it will be useful, |
| @@ -22,6 +24,8 @@ | |||
| 22 | ;; along with GNU Emacs; see the file COPYING. If not, write to | 24 | ;; along with GNU Emacs; see the file COPYING. If not, write to |
| 23 | ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | 25 | ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
| 24 | 26 | ||
| 27 | ;;; Code: | ||
| 28 | |||
| 25 | (require 'comint) | 29 | (require 'comint) |
| 26 | 30 | ||
| 27 | (defvar tex-shell-file-name nil | 31 | (defvar tex-shell-file-name nil |
diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el index f23ffbba7aa..1c35f4c46e4 100644 --- a/lisp/textmodes/texinfmt.el +++ b/lisp/textmodes/texinfmt.el | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | ;;;; texinfmt.el --- convert Texinfo files to Info files. | 1 | ;;;; texinfmt.el --- convert Texinfo files to Info files. |
| 2 | 2 | ||
| 3 | ;;;; Version 2.00 14 Dec 1990 | 3 | ;; Author: Robert J. Chassell <bob@gnu.ai.mit.edu> |
| 4 | ;; Version: 2.00 | ||
| 5 | ;; Last-Modified: 14 Dec 1990 | ||
| 4 | 6 | ||
| 5 | ;; Copyright (C) 1985, 1986, 1988, 1990 Free Software Foundation, Inc. | 7 | ;; Copyright (C) 1985, 1986, 1988, 1990 Free Software Foundation, Inc. |
| 6 | 8 | ||
| @@ -8,7 +10,7 @@ | |||
| 8 | 10 | ||
| 9 | ;; GNU Emacs is free software; you can redistribute it and/or modify | 11 | ;; GNU Emacs is free software; you can redistribute it and/or modify |
| 10 | ;; it under the terms of the GNU General Public License as published by | 12 | ;; it under the terms of the GNU General Public License as published by |
| 11 | ;; the Free Software Foundation; either version 1, or (at your option) | 13 | ;; the Free Software Foundation; either version 2, or (at your option) |
| 12 | ;; any later version. | 14 | ;; any later version. |
| 13 | 15 | ||
| 14 | ;; GNU Emacs is distributed in the hope that it will be useful, | 16 | ;; GNU Emacs is distributed in the hope that it will be useful, |
| @@ -20,12 +22,16 @@ | |||
| 20 | ;; along with GNU Emacs; see the file COPYING. If not, write to | 22 | ;; along with GNU Emacs; see the file COPYING. If not, write to |
| 21 | ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | 23 | ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
| 22 | 24 | ||
| 25 | ;;; Commentary: | ||
| 26 | |||
| 23 | ;; Updated May 1990 to correspond, more or less, to version 2.8 of | 27 | ;; Updated May 1990 to correspond, more or less, to version 2.8 of |
| 24 | ;; texinfo.tex. NOTE: texinfmt.el is being phased out; it is being | 28 | ;; texinfo.tex. NOTE: texinfmt.el is being phased out; it is being |
| 25 | ;; replaced by makeinfo.c, which is faster and provides better error | 29 | ;; replaced by makeinfo.c, which is faster and provides better error |
| 26 | ;; checking. | 30 | ;; checking. |
| 27 | ;; Robert J. Chassell, bob@ai.mit.edu | 31 | ;; Robert J. Chassell, bob@ai.mit.edu |
| 28 | 32 | ||
| 33 | ;;; Code: | ||
| 34 | |||
| 29 | (defvar texinfo-format-syntax-table nil) | 35 | (defvar texinfo-format-syntax-table nil) |
| 30 | 36 | ||
| 31 | (defvar texinfo-vindex) | 37 | (defvar texinfo-vindex) |
diff --git a/lisp/textmodes/texinfo.el b/lisp/textmodes/texinfo.el index 76cbc5b2a2b..837dd3e3a2f 100644 --- a/lisp/textmodes/texinfo.el +++ b/lisp/textmodes/texinfo.el | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | ;;;; texinfo.el ---- major mode for editing Texinfo files. | 1 | ;;;; texinfo.el ---- major mode for editing Texinfo files. |
| 2 | 2 | ||
| 3 | ;;;; Version 2.00 14 Dec 1990 | 3 | ;; Author: Bob Chassell <bob@gnu.ai.mit.edu> |
| 4 | ;; Version: 2.00 | ||
| 5 | ;; Last-Modified: 14 Dec 1990 | ||
| 4 | 6 | ||
| 5 | ;; Copyright (C) 1985, 1988, 1989, 1990 Free Software Foundation, Inc. | 7 | ;; Copyright (C) 1985, 1988, 1989, 1990 Free Software Foundation, Inc. |
| 6 | 8 | ||
| @@ -8,7 +10,7 @@ | |||
| 8 | 10 | ||
| 9 | ;; GNU Emacs is free software; you can redistribute it and/or modify | 11 | ;; GNU Emacs is free software; you can redistribute it and/or modify |
| 10 | ;; it under the terms of the GNU General Public License as published by | 12 | ;; it under the terms of the GNU General Public License as published by |
| 11 | ;; the Free Software Foundation; either version 1, or (at your option) | 13 | ;; the Free Software Foundation; either version 2, or (at your option) |
| 12 | ;; any later version. | 14 | ;; any later version. |
| 13 | 15 | ||
| 14 | ;; GNU Emacs is distributed in the hope that it will be useful, | 16 | ;; GNU Emacs is distributed in the hope that it will be useful, |
| @@ -20,6 +22,8 @@ | |||
| 20 | ;; along with GNU Emacs; see the file COPYING. If not, write to | 22 | ;; along with GNU Emacs; see the file COPYING. If not, write to |
| 21 | ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | 23 | ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
| 22 | 24 | ||
| 25 | ;;; Code: | ||
| 26 | |||
| 23 | (require 'texnfo-upd) | 27 | (require 'texnfo-upd) |
| 24 | (require 'tex-mode) | 28 | (require 'tex-mode) |
| 25 | (defvar texinfo-mode-syntax-table nil) | 29 | (defvar texinfo-mode-syntax-table nil) |
diff --git a/lisp/textmodes/underline.el b/lisp/textmodes/underline.el index da341b2ab9c..b30f897586c 100644 --- a/lisp/textmodes/underline.el +++ b/lisp/textmodes/underline.el | |||
| @@ -1,12 +1,15 @@ | |||
| 1 | ;;; underline.el --- insert/remove underlining (done by overstriking) in Emacs. | 1 | ;;; underline.el --- insert/remove underlining (done by overstriking) in Emacs. |
| 2 | 2 | ||
| 3 | ;; Maintainer: FSF | ||
| 4 | ;; Last-Modified: 30 May 1988 | ||
| 5 | |||
| 3 | ;; Copyright (C) 1985 Free Software Foundation, Inc. | 6 | ;; Copyright (C) 1985 Free Software Foundation, Inc. |
| 4 | 7 | ||
| 5 | ;; This file is part of GNU Emacs. | 8 | ;; This file is part of GNU Emacs. |
| 6 | 9 | ||
| 7 | ;; GNU Emacs is free software; you can redistribute it and/or modify | 10 | ;; GNU Emacs is free software; you can redistribute it and/or modify |
| 8 | ;; it under the terms of the GNU General Public License as published by | 11 | ;; it under the terms of the GNU General Public License as published by |
| 9 | ;; the Free Software Foundation; either version 1, or (at your option) | 12 | ;; the Free Software Foundation; either version 2, or (at your option) |
| 10 | ;; any later version. | 13 | ;; any later version. |
| 11 | 14 | ||
| 12 | ;; GNU Emacs is distributed in the hope that it will be useful, | 15 | ;; GNU Emacs is distributed in the hope that it will be useful, |
| @@ -18,6 +21,7 @@ | |||
| 18 | ;; along with GNU Emacs; see the file COPYING. If not, write to | 21 | ;; along with GNU Emacs; see the file COPYING. If not, write to |
| 19 | ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | 22 | ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
| 20 | 23 | ||
| 24 | ;;; Code: | ||
| 21 | 25 | ||
| 22 | ;;;###autoload | 26 | ;;;###autoload |
| 23 | (defun underline-region (start end) | 27 | (defun underline-region (start end) |