home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / msdos / winemacs / lisp / modes / bibtex.elc < prev    next >
Encoding:
Text File  |  1993-06-08  |  19.7 KB  |  201 lines

  1. ;;; compiled by @win386 on Sat Mar 13 14:30:13 1993
  2. ;;; from file c:/src/lucid-19.4/lisp/modes/bibtex.el
  3. ;;; emacs version 19.3 Lucid.
  4. ;;; bytecomp version 2.08; 27-aug-92.
  5. ;;; optimization is on.
  6. ;;; this file uses opcodes which do not exist in Emacs18.
  7.  
  8. (if (and (boundp 'emacs-version)
  9.      (or (and (boundp 'epoch::version) epoch::version)
  10.          (string-lessp emacs-version "19")))
  11.     (error "This file was compiled for Emacs19."))
  12.  
  13. (defvar bibtex-mode-syntax-table nil "\
  14. ")
  15. (defvar bibtex-mode-abbrev-table nil "\
  16. ")
  17. (define-abbrev-table 'bibtex-mode-abbrev-table nil)
  18. (defvar bibtex-mode-map (make-sparse-keymap) "\
  19. ")
  20. (defvar bibtex-pop-previous-search-point nil "\
  21. Next point where bibtex-pop-previous should start looking for a similar
  22. entry.")
  23. (defvar bibtex-pop-next-search-point nil "\
  24. Next point where bibtex-pop-next should start looking for a similar
  25. entry.")
  26. (fset 'bibtex-cfield #[(name text) "└    ┬ ─░ç" [",[     \n]*\\(" name "\\)[     \n]*=[     \n]*\\(" text "\\)"] 5 "\
  27. Create a regexp for a bibtex field of name NAME and text TEXT"])
  28. (defconst bibtex-name-in-cfield 1 "\
  29. The regexp subexpression number of the name part in bibtex-cfield.")
  30. (defconst bibtex-text-in-cfield 2 "\
  31. The regexp subexpression number of the text part in bibtex-cfield.")
  32. (defconst bibtex-field-name "[A-Za-z][---A-Za-z0-9:_+]*" "\
  33. Regexp defining the name part of a bibtex field.")
  34. (defconst bibtex-field-text "\"[^\"]*[^\\\\]\"\\|\"\"\\|[0-9A-Za-z][---A-Za-z0-9:_+]*" "\
  35. Regexp defining the text part of a bibtex field: either a string, or an empty string, or a constant.")
  36. (defconst bibtex-field (bibtex-cfield bibtex-field-name bibtex-field-text) "\
  37. Regexp defining the format of a bibtex field")
  38. (defconst bibtex-name-in-field bibtex-name-in-cfield "\
  39. The regexp subexpression number of the name part in bibtex-field")
  40. (defconst bibtex-text-in-field bibtex-text-in-cfield "\
  41. The regexp subexpression number of the text part in bibtex-field")
  42. (defconst bibtex-reference-type "@[A-Za-z]+" "\
  43. Regexp defining the type part of a bibtex reference entry")
  44. (defconst bibtex-reference-head (concat "^[     ]*\\(" bibtex-reference-type "\\)[     ]*[({]\\(" bibtex-field-name "\\)") "\
  45. Regexp defining format of the header line of a bibtex reference entry")
  46. (defconst bibtex-type-in-head 1 "\
  47. The regexp subexpression number of the type part in bibtex-reference-head")
  48. (defconst bibtex-key-in-head 2 "\
  49. The regexp subexpression number of the key part in
  50. bibtex-reference-head")
  51. (defconst bibtex-reference (concat bibtex-reference-head "\\([     \n]*" bibtex-field "\\)*" "[     \n]*[})]") "\
  52. Regexp defining the format of a bibtex reference entry")
  53. (defconst bibtex-type-in-reference bibtex-type-in-head "\
  54. The regexp subexpression number of the type part in bibtex-reference")
  55. (defconst bibtex-key-in-reference bibtex-key-in-head "\
  56. The regexp subexpression number of the key part in
  57. bibtex-reference")
  58. (defconst bibtex-string (concat "^[     ]*@[sS][tT][rR][iI][nN][gG][     \n]*[({][     \n]*\\(" bibtex-field-name "\\)[     \n]*=[     \n]*\\(" bibtex-field-text "\\)[     \n]*[})]") "\
  59. Regexp defining the format of a bibtex string entry")
  60. (defconst bibtex-name-in-string 1 "\
  61. The regexp subexpression of the name part in bibtex-string")
  62. (defconst bibtex-text-in-string 2 "\
  63. The regexp subexpression of the text part in bibtex-string")
  64. (defconst bibtex-name-alignement 2 "\
  65. Alignment for the name part in BibTeX fields.
  66. Chosen on aesthetic grounds only.")
  67. (defconst bibtex-text-alignment (length "  organization = ") "\
  68. Alignment for the text part in BibTeX fields.
  69. Equal to the space needed for the longest name part.")
  70. (fset 'bibtex-mode #[nil "└ ê    ½å┬    !ê¬┤├ ┬    !ê─┼╞\"ê─╟╚\"ê─╔╩\"ê─╦╠\"ê─═╠\"ê─╬╧\"ê─╨╤\"ê─╥╤\"ê─╙╘\"ê╒!ê╫┘┬    !ê▌▐!ê▀αßΓ#êαπΣ#êασµ#êατΦ#êαΘΩ#êαδ∞#êαφε#êα∩≡#êα±≥#êα≤⌠#êα⌡÷#êα≈°#êα∙·#êα√ⁿ#êα²°#êα■ #êαü@üA#êαüBüC#êαüDüE#êαüFüG#êαüHüI#êαüJüK#êαüLüM#êαüNüO#êüPüQ!êRüQ\\SüTüU!ç" [kill-all-local-variables bibtex-mode-syntax-table set-syntax-table make-syntax-table modify-syntax-entry 34 "." 36 "$$  " 37 "<   " 39 "w   " 64 92 "\\" 12 ">   " 10 126 " " use-local-map bibtex-mode-map bibtex-mode major-mode "BibTeX" mode-name bibtex-mode-abbrev-table local-abbrev-table make-local-variable paragraph-start "^[  \n    ]*$" define-key "    " bibtex-find-text "\n" bibtex-next-field "\"" bibtex-remove-double-quotes "" bibtex-clean-entry "?" describe-mode "" bibtex-pop-previous "" bibtex-pop-next " " bibtex-kill-optional-field "" bibtex-empty-field "" bibtex-Article "" bibtex-Book "" bibtex-InProceedings "    " bibtex-InBook "i" bibtex-InCollection "I" "
  71. " bibtex-Manual "m" bibtex-MastersThesis "M" bibtex-Misc "" bibtex-remove-OPT "" bibtex-PhdThesis "p" bibtex-Proceedings "" bibtex-TechReport "" bibtex-string "" bibtex-Unpublished auto-fill-mode 1 bibtex-text-alignment left-margin run-hooks bibtex-mode-hook] 4 "\
  72. Major mode for editing bibtex files.
  73.  
  74. \\{bibtex-mode-map}
  75.  
  76. A command such as \\[bibtex-Book] will outline the fields for a BibTeX book entry.
  77.  
  78. The optional fields start with the string OPT, and thus ignored by BibTeX.
  79. The OPT string may be removed from a field with \\[bibtex-remove-OPT].
  80. \\[bibtex-kill-optional-field] kills the current optional field entirely.
  81. \\[bibtex-remove-double-quotes] removes the double-quotes around the text of
  82. the current field.  \\[bibtex-empty-field] replaces the text of the current
  83. field with the default \"\".
  84.  
  85. The command \\[bibtex-clean-entry] cleans the current entry, i.e. (i) removes
  86. double-quotes from entirely numerical fields, (ii) removes OPT from all
  87. non-empty optional fields, (iii) removes all empty optional fields, and (iv)
  88. checks that no non-optional fields are empty.
  89.  
  90. Use \\[bibtex-find-text] to position the dot at the end of the current field.
  91. Use \\[bibtex-next-field] to move to end of the next field.
  92.  
  93. \\[bibtex-x-environment] binds a mode-specific X menu to control+right
  94. mouse button.
  95. \\[bibtex-sun-environment] binds a mode-specific Sun menu to right
  96. mouse button.
  97.  
  98. Fields:
  99.     address
  100.            Publisher's address
  101.     annote
  102.            Long annotation used for annotated bibliographies (begins sentence)
  103.     author
  104.            Name(s) of author(s), in BibTeX name format
  105.     booktitle
  106.            Book title when the thing being referenced isn't the whole book.
  107.            For book entries, the title field should be used instead.
  108.     chapter
  109.            Chapter number
  110.     edition
  111.            Edition of a book (e.g., \"second\")
  112.     editor
  113.            Name(s) of editor(s), in BibTeX name format.
  114.            If there is also an author field, then the editor field should be
  115.            for the book or collection that the work appears in
  116.     howpublished
  117.             How something strange has been published (begins sentence)
  118.     institution
  119.            Sponsoring institution
  120.     journal
  121.            Journal name (macros are provided for many)
  122.     key
  123.            Alphabetizing and labeling key (needed when no author or editor)
  124.     month
  125.            Month (macros are provided)
  126.     note
  127.            To help the reader find a reference (begins sentence)
  128.     number
  129.            Number of a journal or technical report
  130.     organization
  131.            Organization (sponsoring a conference)
  132.     pages
  133.            Page number or numbers (use `--' to separate a range)
  134.     publisher
  135.            Publisher name
  136.     school
  137.            School name (for theses)
  138.     series
  139.            The name of a series or set of books.
  140.            An individual book will will also have it's own title
  141.     title
  142.            The title of the thing being referenced
  143.     type
  144.            Type of a technical report (e.g., \"Research Note\") to be used
  145.            instead of the default \"Technical Report\"
  146.     volume
  147.            Volume of a journal or multivolume work
  148.     year
  149.            Year---should contain only numerals
  150. ---------------------------------------------------------
  151. Entry to this mode calls the value of bibtex-mode-hook if that value is
  152. non-nil." nil])
  153. (fset 'bibtex-move-outside-of-entry #[nil "`dU¼É`eU¼ï└┴!¼å┬ ê├ ê─┼d╞#ç" [looking-at "[ \n]*@" backward-paragraph forward-paragraph re-search-forward "[     \n]*" t] 4 "\
  154. Make sure we are outside of a bib entry"])
  155. (byte-code "└┴Mê┬├Mê─┼Mê╞╟Mê╚╔Mê╩╦Mê╠═Mê╬╧Mê╨╤Mê╥╙Mê╘╒Mê╓╫Mê╪┘Mê┌█Mê▄▌Mê▐▀MêαßMêΓπMç" [bibtex-entry #[(entry-type required optional) "└ ê┴\n├▒ê─┼\"ê─╟\"ê╔cê╩uê╦╠!ê═uç" [bibtex-move-outside-of-entry "@" entry-type "{" mapcar bibtex-make-entry required bibtex-make-optional-entry optional "\n}\n\n" -3 up-list -1 1] 3] bibtex-make-entry #[(str) "└cê    jê\n├▒ê jê┼cê╞ç" [",\n" bibtex-name-alignement str " = " bibtex-text-alignment "\"\"" nil] 2 nil "sBibTeX entry type: "] bibtex-make-optional-entry #[(str) "└cê    jê┬ ─▒ê
  156. jê╞cê╟ç" [",\n" bibtex-name-alignement "OPT" str " = " bibtex-text-alignment "\"\"" nil] 3 nil "sOptional BibTeX entry type: "] bibtex-Article #[nil "└┴┬├#ç" [bibtex-entry "Article" ("author" "title" "journal" "year") ("volume" "number" "pages" "month" "note")] 4 nil nil] bibtex-Book #[nil "└┴┬├#ç" [bibtex-entry "Book" ("author" "title" "publisher" "year") ("editor" "volume" "series" "address" "edition" "month" "note")] 4 nil nil] bibtex-Booklet #[nil "└┴┬├#ç" [bibtex-entry "Booklet" ("title") ("author" "howpublished" "address" "month" "year" "note")] 4 nil nil] bibtex-DEAthesis #[nil "└┴┬├#ç" [bibtex-entry "DEAthesis" ("author" "title" "school" "year") ("address" "month" "note")] 4 nil nil] bibtex-InBook #[nil "└┴┬├#ç" [bibtex-entry "InBook" ("author" "title" "chapter" "publisher" "year") ("editor" "pages" "volume" "series" "address" "edition" "month" "note")] 4 nil nil] bibtex-InCollection #[nil "└┴┬├#ç" [bibtex-entry "InCollection" ("author" "title" "booktitle" "publisher" "year") ("editor" "chapter" "pages" "address" "month" "note")] 4 nil nil] bibtex-InProceedings #[nil "└┴┬├#ç" [bibtex-entry "InProceedings" ("author" "title" "booktitle" "year") ("editor" "pages" "organization" "publisher" "address" "month" "note")] 4 nil nil] bibtex-Manual #[nil "└┴┬├#ç" [bibtex-entry "Manual" ("title") ("author" "organization" "address" "edition" "year" "month" "note")] 4 nil nil] bibtex-MastersThesis #[nil "└┴┬├#ç" [bibtex-entry "MastersThesis" ("author" "title" "school" "year") ("address" "month" "note")] 4 nil nil] bibtex-Misc #[nil "└┴┬├#ç" [bibtex-entry "Misc" nil ("author" "title" "howpublished" "year" "month" "note")] 4 nil nil] bibtex-PhdThesis #[nil "└┴┬├#ç" [bibtex-entry "PhdThesis" ("author" "title" "school" "year") ("address" "month" "note")] 4 nil nil] bibtex-Proceedings #[nil "└┴┬├#ç" [bibtex-entry "Proceedings" ("title" "year") ("editor" "publisher" "organization" "address" "month" "note")] 4 nil nil] bibtex-TechReport #[nil "└┴┬├#ç" [bibtex-entry "TechReport" ("author" "title" "institution" "year") ("type" "number" "address" "month" "note")] 4 nil nil] bibtex-Unpublished #[nil "└┴┬├#ç" [bibtex-entry "Unpublished" ("author" "title" "note") ("year" "month")] 4 nil nil] bibtex-string #[nil "└ ê┴┬├▒ê─┼!ê╞uç" [bibtex-move-outside-of-entry "@string{ = " "" "}\n" previous-line 1 8] 3 nil nil]] 2)
  157. (fset 'bibtex-next-field #[(arg) "└ ê`┬├─Åê)┼!ç" [bibtex-inside-field start nil (byte-code "└ ê┴òbê┬uç" [bibtex-enclosing-field 0 2] 1) ((error (byte-code "bê┴ê┬uç" [start nil 1] 1))) bibtex-find-text arg] 3 "\
  158. Finds end of text of next BibTeX field; with arg, to its beginning" "P"])
  159. (fset 'bibtex-find-text #[(arg) "└ ê┴ ê\n½î öbê─┼!¡Ä╞uç òbêh╟U¡é╚uç" [bibtex-inside-field bibtex-enclosing-field arg bibtex-text-in-field looking-at "\"" 1 34 -1] 2 "\
  160. Go to end of text of current field; with arg, go to beginning." "P"])
  161. (fset 'bibtex-remove-OPT #[nil "└ ê┴ êè\nöbê├─!½à┼─G!ê)└ ç" [bibtex-inside-field bibtex-enclosing-field bibtex-name-in-field looking-at "OPT" delete-char] 2 "\
  162. Removes the 'OPT' starting optional arguments and goes to end of text" nil])
  163. (fset 'bibtex-inside-field #[nil "└ê┴└xêh┬U½â├uê├uç" [nil "     " 44 -1] 2 "\
  164. Try to avoid point being at end of a bibtex field." nil])
  165. (fset 'bibtex-remove-double-quotes #[nil "è└ ê┴ ê\nö\nò bê┼uê╞╟!½ä╚╔!ê bê╞╟!¡â╚╔!+ç" [bibtex-inside-field bibtex-enclosing-field bibtex-text-in-field stop start -1 looking-at "\"" delete-char 1] 2 "\
  166. Removes \"\" around string." nil])
  167. (fset 'bibtex-kill-optional-field #[nil "└ ê┴ ê\nöbê├ò├ö╞╟!½ì
  168. bê╚╔wê╩
  169. \"¬â╦╠!*ç" [bibtex-inside-field bibtex-enclosing-field bibtex-name-in-field 0 the-beginning the-end looking-at "OPT" "     \n," nil kill-region error "Mandatory fields can't be killed"] 3 "\
  170. Kill the entire enclosing optional BibTeX field" nil])
  171. (fset 'bibtex-empty-field #[nil "└ ê┴ ê\nöbê├`\nò\"ê─cê┼╞!ç" [bibtex-inside-field bibtex-enclosing-field bibtex-text-in-field kill-region "\"\"" bibtex-find-text t] 3 "\
  172. Delete the text part of the current field, replace with empty text" nil])
  173. (fset 'bibtex-pop-previous #[(arg) "└ êè┴ ê\nö\nò ö ò─    bê╩╦╠!½å`╠G\\¬ü`{
  174. \"╨=¼æ╤=¼ï╥ ê╙ö╙òbê╓e╫$½óöò{╙ò╙ö┌ êbê    |ê
  175. cê¬ä█▄!ê.╨ëç" [bibtex-inside-field bibtex-enclosing-field bibtex-text-in-field bibtex-name-in-field nil new-text stop-name start-name stop-old-text start-old-text bibtex-cfield looking-at "OPT" bibtex-field-text matching-entry last-command bibtex-pop-previous bibtex-pop-next bibtex-enclosing-reference 0 bibtex-pop-previous-search-point bibtex-pop-next-search-point re-search-backward t arg bibtex-text-in-cfield bibtex-flash-head error "No previous matching BibTeX field." this-command] 5 "\
  176. Replace text of current field with the text of similar field in previous entry.
  177. With arg, go up ARG entries.  Repeated, goes up so many times.  May be
  178. intermixed with \\[bibtex-pop-next] (bibtex-pop-next)." "p"])
  179. (fset 'bibtex-pop-next #[(arg) "└ êè┴ ê\nö\nò ö ò─    bê╩╦╠!½å`╠G\\¬ü`{
  180. \"╨=¼æ╤=¼ï╥ ê╙ö╙òbê╓d╫$½óöò{╙ò╙ö┌ êbê    |ê
  181. cê¬ä█▄!ê.╨ëç" [bibtex-inside-field bibtex-enclosing-field bibtex-text-in-field bibtex-name-in-field nil new-text stop-name start-name stop-old-text start-old-text bibtex-cfield looking-at "OPT" bibtex-field-text matching-entry last-command bibtex-pop-next bibtex-pop-previous bibtex-enclosing-reference 0 bibtex-pop-previous-search-point bibtex-pop-next-search-point re-search-forward t arg bibtex-text-in-cfield bibtex-flash-head error "No next matching BibTeX field." this-command] 5 "\
  182. Replace text of current field with the text of similar field in next entry.
  183. With arg, go up ARG entries.  Repeated, goes up so many times.  May be
  184. intermixed with \\[bibtex-pop-previous] (bibtex-pop-previous)." "p"])
  185. (fset 'bibtex-flash-head #[nil "└┬ e─#½è
  186. öbêò¬É└ê╟└xê`╚yê╟└wê╔`!½à╩╦!¬å╠═`    {\")ç" [nil flash re-search-backward bibtex-reference-head t bibtex-type-in-head bibtex-key-in-reference "     " 0 pos-visible-in-window-p sit-for 1 message "From: %s"] 4 "\
  187. Flash at BibTeX reference head before point, if exists.  (Moves point)."])
  188. (fset 'bibtex-enclosing-field #[nil "└┴┬Åç" [errname (bibtex-enclosing-regexp bibtex-field) ((search-failed (error "Can't find enclosing BibTeX field.")))] 3 "\
  189. Search for BibTeX field enclosing point.
  190. Point moves to end of field; also, use match-beginning and match-end
  191. to parse the field."])
  192. (fset 'bibtex-enclosing-reference #[nil "└┴┬Åç" [errname (bibtex-enclosing-regexp bibtex-reference) ((search-failed (error "Can't find enclosing BibTeX reference.")))] 3 "\
  193. Search for BibTeX reference enclosing point.
  194. Point moves to end of reference; also, use match-beginning and match-end
  195. to parse the reference."])
  196. (fset 'bibtex-enclosing-regexp #[(regexp) "`┴\nd├#½ä─ò¬üdbê╞\ne├#½ä─ö¬üeëbê┴\n
  197. ╚╔$ê─öV½å╩╦\nC\"ê─òX¡ò┴\n
  198. ╚╔$ê─öV½m╩╦\nC\"ê¬e+ç" [initial re-search-forward regexp t 0 right re-search-backward left nil 1 signal search-failed] 6 "\
  199. Search for REGEXP enclosing point.
  200. Point moves to end of REGEXP.  See also match-beginning and match-end.
  201. If an enclosing REGEXP is not found, signals search-failed; point is left in
  202. an undefined location.
  203.  
  204. [Doesn't something like this exist already?]" "sRegexp: "])
  205. (fset 'bibtex-clean-entry #[nil "└ ê┴öbê`î\n┴ò}ê├ d┼╞$â¢┴ö┴òöòöò    \n  
  206.  bê╧╨!½á\nbê╧╤!½ê
  207. |ê¬╚ bê╥╨G!êbê¬╣\nbê╧╙!½Ö    bê╥╘!ê\nbê╥╞!ê
  208. bê╒uê¬ù╧╤!½Ä╞uê╓╫  {\"ê¬ä
  209. bê.é)\nbê╪┘wê└ ê┴òbê┌┘w)ç" [bibtex-enclosing-reference 0 start re-search-forward bibtex-field t 1 bibtex-name-in-field bibtex-text-in-field end-text begin-text end-name begin-name end-field begin-field looking-at "OPT" "\"\"" delete-char "\"[0-9]+\"" -1 -2 error "Mandatory field ``%s'' is empty" "@a-zA-Z" nil "     \n "] 6 "\
  210. For all optional fields of current BibTeX entry: if empty, kill the whole field; otherwise, remove the \"OPT\" string in the name; if text numerical, remove double-quotes.  For all mandatory fields: if empty, signal error." nil])
  211. (fset 'bibtex-x-help #[(arg) "└    ┬\"ë¡â─ !)ç" [x-popup-menu arg ("BibTeX commands" ("BibTeX entry types" (" article in conference Proceedings " . bibtex-InProceedings) ("        Article in journal         " . bibtex-Article) ("               Book                " . bibtex-Book) ("             Booklet               " . bibtex-Booklet) ("         Master's Thesis           " . bibtex-MastersThesis) ("            Phd. Thesis            " . bibtex-PhdThesis) ("         Technical Report          " . bibtex-TechReport) ("         technical Manual          " . bibtex-Manual) ("      conference Proceedings       " . bibtex-Proceedings) ("        a chapter in a Book        " . bibtex-InBook) ("    an article in a Collection     " . bibtex-InCollection) ("           miscellaneous           " . bibtex-Misc) ("            unpublished            " . bibtex-Unpublished) ("              string               " . bibtex-string)) ("Moving around and editing" ("            next field             " . bibtex-next-field) ("          to end of field          " . bibtex-find-text) ("snatch from similar preceding field" . bibtex-pop-previous) ("snatch from similar following field" . bibtex-pop-next) ("            remove OPT             " . bibtex-remove-OPT) ("           remove quotes           " . bibtex-remove-double-quotes) ("          clean up entry           " . bibtex-clean-entry)) ("help" ("       describe BibTeX mode        " . describe-mode))) selection call-interactively] 4 "\
  212. Mouse commands for BibTeX mode"])
  213. (fset 'bibtex-x-environment #[nil "└┴!ê┬ ┼#ç" [require x-mouse define-key mouse-map x-button-c-right bibtex-x-help] 4 "\
  214. Set up X menus for BibTeX mode.  Call it as bibtex-mode-hook, or interactively" nil])
  215. (byte-code "└┴!½ä┬├!ê└ç" [fboundp defmenu eval (progn (defmenu bibtex-sun-entry-menu ("Article In Conf. Proc." (lambda nil (eval-in-window *menu-window* (bibtex-InProceedings)))) ("Article In Journal" (lambda nil (eval-in-window *menu-window* (bibtex-Article)))) ("Book" (lambda nil (eval-in-window *menu-window* (bibtex-Book)))) ("Booklet" (lambda nil (eval-in-window *menu-window* (bibtex-Booklet)))) ("Master's Thesis" (lambda nil (eval-in-window *menu-window* (bibtex-MastersThesis)))) ("PhD. Thesis" (lambda nil (eval-in-window *menu-window* (bibtex-PhdThesis)))) ("Technical Report" (lambda nil (eval-in-window *menu-window* (bibtex-TechReport)))) ("Technical Manual" (lambda nil (eval-in-window *menu-window* (bibtex-Manual)))) ("Conference Proceedings" (lambda nil (eval-in-window *menu-window* (bibtex-Proceedings)))) ("In A Book" (lambda nil (eval-in-window *menu-window* (bibtex-InBook)))) ("In A Collection" (lambda nil (eval-in-window *menu-window* (bibtex-InCollection)))) ("Miscellaneous" (lambda nil (eval-in-window *menu-window* (bibtex-Misc)))) ("Unpublished" (lambda nil (eval-in-window *menu-window* (bibtex-Unpublished))))) (defmenu bibtex-sun-menu ("BibTeX menu") ("add entry" . bibtex-sun-entry-menu) ("add string" (lambda nil (eval-in-window *menu-window* (bibtex-string)))) ("describe BibTeX mode" (lambda nil (eval-in-window *menu-window* (describe-mode)))) ("Main Emacs menu" . emacs-menu)) (defun bibtex-sun-menu-eval (window x y) "Pop-up menu of BibTeX commands." (sun-menu-evaluate window (1+ x) (1- y) 'bibtex-sun-menu)) (defun bibtex-sun-environment nil "Set up sun menus for BibTeX mode.  Call it as bibtex-mode-hook, or interactively" (interactive) (local-set-mouse '(text right) 'bibtex-sun-menu-eval)))] 2)
  216.